GetQueryEntityDefNames
Description
Returns the names of the record types that are suitable for use in queries.
You can use any of the names returned by this method
in the entitydef_name parameter for the BuildQuery
method.
(You can also retrieve an EntityDef object by calling the GetEntityDef
method.)
Note: The record types built into HCL Compass can
be used in queries, so the returned array is never empty.
Syntax
VBScript
session.GetQueryEntityDefNames
Perl
$session->GetQueryEntityDefNames
();
- Identifier
- Description
- session
- The Session object that represents the current database-access session.
- Return value
- For Visual Basic, a Variant containing an array of
strings is returned. Each String contains the name of an EntityDef
that can be used in a query.
For Perl, a reference to an array of strings is returned.
Examples
VBScript
set sessionObj = GetSession
' Get the list of names of the record types that support queries.
entityDefNames = sessionObj.GetQueryEntityDefNames
' Iterate over all record types
for each name in entityDefNames
set queryDefObj = sessionObj.BuildQuery(name)
' Fill in the query parameters and run it
Next
Perl
$sessionObj = $entity->GetSession();
# Get the list of names of the record types that support queries.
$entityDefNames = $sessionObj->GetQueryEntityDefNames();
#Iterate over the state-based record types
foreach $name ( @$entityDefNames ){
$queryDefObj = $sessionObj->BuildQuery( $name );
#Fill in the query parameters and run it
# ...
}