GetListDefNames
Description
Returns a list of the dynamic lists in the current database.
Syntax
VBScript
sessionObj.GetListDefNames
Perl
$sessionObj->GetListDefNames
();
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- Return value
For Visual Basic, a Variant containing an Array whose elements
are strings is returned. Each String contains the name of one field.
For Perl, a reference to an array of strings is returned
Example
VBScript
' This example assumes there is at least 1 dynamic list
' in the current database-access session.
set sessionObj = GetSession
sessionObj.UserLogon "admin", "", "SAMPL", AD_PRIVATE_SESSION, ""
' Get a list of the names of Dynamic Lists that exist in this database...
DynamicListNamesRef = sessionObj.GetListDefNames
' For each of the lists, print out its members...
For Each ListName in DynamicListNamesRef
print ListName
' Then, for each list, get the list members in each list,
members = sessionObj.GetListMembers(ListName)
' print out the list members...
For Each member In members
print member
Next
Next
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();
$NListDefNames = scalar @$ListDefNamesREF;
if ( $NListDefNames == 0) {
print "\n"
."There are no dynamic lists in this database.\n"
."Unable to continue.\n"
."Re-invoke this program specifying a user database with some dynamic
lists defined.\n";
exit 1;
} else {
print "\nThere are $NListDefNames dynamic lists in this database:\n";
foreach $ListName (@$ListDefNamesREF) {
print " '$ListName'\n";
}
}
# For one of the lists, print out its members...
$ListName = @$ListDefNamesREF[0];
$members = $sessionObj->GetListMembers($ListName);
foreach $member (@$members){
print $member, "\n";
}