GetValue

Description

Returns the field's list of values as a single String.

This method returns a single String. If a field contains a list of values, the String contains a concatenation of the values, separated by newline characters. For a field that returns multiple values, you can use the GetValueAsList method to get a separate String for each value.

To determine if a field can contain multiple values, call the GetType method on the corresponding FieldInfo object. If the type of the field is REFERENCE_LIST, ATTACHMENT_LIST, or JOURNAL, the field can contain multiple values.

Fields whose type is either ATTACHMENT_LIST or JOURNAL cannot be modified programmatically.

Syntax

VBScript


fieldInfo.GetValue 

Perl


$fieldInfo->GetValue(); 
Identifier
Description
fieldInfo
A FieldInfo object, which contains information about one field of a user data record.
Return value
A String that contains the value or values stored in the field.

Example

Perl


my($FieldNamesRef) = $entity->GetFieldNames();

   # Loop through the fields, showing name, type, old/new value...

   foreach $FN (@$FieldNamesRef) {

      # Get the field's original value...

      $FieldInfo = $entity->GetFieldOriginalValue($FN);

      $FieldValueStatus = $FieldInfo->GetValueStatus();

      if ($FieldValueStatus == $CQPerlExt::CQ_HAS_NO_VALUE) {

         $OldFV = "<no value>";

      } elsif ($FieldValueStatus == $CQPerlExt::CQ_VALUE_NOT_AVAILABLE) {

         $OldFV = "<value not available>";

      } elsif ($FieldValueStatus == $CQPerlExt::CQ_HAS_VALUE) {

         $OldFV = $FieldInfo->GetValue();

      } else {

         $OldFV = "<Invalid value status: " . $FieldValueStatus . ">";

      }