Returns the main level of the task. Unlike the Level function, this function returns RM instead of the actual logic unit when querying the level of an Online, Rich Client or Browser task that executes a logic unit of an asynchronous event. The RM string is also returned when the specified task executes a logic unit of an event that is raised synchronously from a Control logic unit or from a logic unit of an asynchronously raised event.
When querying the level of a Batch task that executes a logic unit of an asynchronous event, this function returns RS instead of the actual logic unit level. The RS string is also returned when the specified task executes a logic unit of an event that was raised synchronously from a logic unit of an asynchronously raised event.
Syntax:
MainLevel(generation)
Parameters:
generation – A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.
Returns:
True for an Alpha string containing:
RP – Record Prefix
RM – Interactive state
RS – Record Suffix
GP_<Group depth> – Group Prefix
GS_<Group depth> – Group Suffix
TP – Task Prefix
TS – Task Suffix
See also:
The Online and Rich Client Samples projects (program TF03 and RTF03)