GetListDefNames

説明

現在のデータベース内の動的リストのリストを戻します。

構文

VBScript

sessionObj.GetListDefNames 

Perl

$sessionObj->GetListDefNames(); 
識別子
説明
session
現在のデータベース アクセス セッションを表す Session オブジェクト。
戻り値

Visual Basic の場合、エレメントが文字列の配列を含む Variant が戻されます。各文字列には、1 つのフィールド名が含まれています。Perl の場合は、文字列の配列への参照が戻されます。

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";
   } 

フィードバック