GetReqEntityDefNames
Description
Returns the names of the state-based record types in the current database's schema.
State-based record types are templates for state-based records. Most databases have at least one state-based record type defining the type of data stored by the database. The database may also have several supporting stateless record type containing secondary information.
Typically, the return value contains at least one name; however, the return value can be an empty Variant if no state-based record types exist in the schema.
After
using this method to get the list of names, you can retrieve the EntityDef Object for a given
record type by calling the GetEntityDef
method.
Syntax
VBScript
session.GetReqEntityDefNames
Perl
$sessionObj->GetReqEntityDefNames
();
- 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 in the array contains the name of
one of the desired record types.
For Perl, a reference to an array of strings is returned.
Examples
VBScript
set sessionObj = GetSession
' Get the list of names of the state-based record types.
entityDefNames = sessionObj.GetReqEntityDefNames
' Iterate over the state-based record types
for each name in entityDefNames
set entityDefObj = sessionObj.GetEntityDef(name)
' Do something with the EntityDef object
Next
Perl
$sessionObj = $entity->GetSession();
#Get the names of the state-based record types.
$entityDefNames = $sessionObj->GetReqEntityDefNames();
#Iterate over the state-based record types
foreach $name ( @$entityDefNames){
print $name, "\n";
$entityDefObj = $session->GetEntityDef( $name);
# Do something with the EntityDef object
# ...
}