Returns a list of string values for the field associated with FieldInfo. This is useful for fields that contain more than one value, including MULTILINE_STRING field types and parent/child controls for reference list types (REFERENCE_LIST).
It is legal to use this method for a scalar field (that is, one that contains a single value). When used on a scalar field, this method returns only one element in the Array (unless the field is empty in which case an Empty Variant is returned).
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.
VBScript
fieldInfo.GetValueAsList
Perl
$fieldInfo->GetValueAsList();
For Perl, a reference to an array of strings containing the values in the list.
VBScript
MyList = MyField.GetValueAsList if not IsEmpty (MyList) then for each listItem in MyList '... next end if ' You can separate the single variant that is returned into an array of ' string list elements by using the Split function: av = GetFieldValue("multiline_string_field").GetValueAsList if not IsEmpty(av) then array = Split(Cstr(av(0)),vbLF) u = UBound(array) for i = 0 to u ' ... next end if Perl $asgs = $entity->GetFieldValue("Assignments")->GetValueAsList(); foreach my $asg (@$asgs) { # ... }