SetListMembers
Description
Sets the members in a named list.
This parameter is an array, so no delimiter is needed to separate member items.
Syntax
Perl
$session->SetListMembers(listName, Members);
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- listName
- A String containing the name of the list.
- Members
-
A reference to an array of strings containing the members of the list.
- Return value
- None.
Example
Perl
# This example assumes there is at least 1 dynamic list
# in the current database-access session.
$sessionObj = $entity->GetSession();
$sessionObj->UserLogon("admin","","SAMPL","");
# Get a list of the names of Dynamic Lists that exist in this database...
$ListDefNamesREF = $sessionObj->GetListDefNames();
$ListName = @$ListDefNamesREF[0];
# Use SetListMembers() to set the list to a specific list of values...
print "\nSetting list '$ListName' to ('ABC', '123', 'XYZ')...\n";
@NewValues = ('ABC', '123', 'XYZ');
$sessionObj->SetListMembers($ListName, \@NewValues);
$members = $sessionObj->GetListMembers($ListName);
#print out the list members
foreach $member (@$members){
print $member, "\n";
}