GetListMembers
Description
Returns the choice values of a dynamic list.
Syntax
Perl
$sessionObj->GetListMembers(list_name);
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- list_name
- A String containing the name of the dynamic list.
- Return value
- A reference to an array of strings is returned.
Example
Perl
# Perl Example 1
$sessionObj = $entity->GetSession();
$sessionObj->UserLogon("admin","","SAMPL","");
$list = $sessionObj->GetListMembers("test");
# If the count is 0, specify a user database
# with some dynamic lists defined.
foreach $x (@$list){
print "List:$x\n";
}
# Perl Example 2
# check if a field value is included in a dynamic list
$result = "Invalid HW_Version entered";
# selected value must be from dynamic list
my $field_value = $entity->GetFieldValue($fieldname)->GetValue();
my $valid_values = $session->GetListMembers("HW_Versions");
foreach (@$valid_values) {
if ($field_value eq $_) {
$result = "";
return $result;
}
}
return $result;