IsModal function
Syntax
IsModal()
Description
The IsModal function returns True if executed from PeopleCode running in a modal secondary page and False if executed elsewhere. This function is useful in separating secondary page-specific logic from general PeopleCode logic.
Parameters
None.
Returns
A Boolean value.
Example
The following example executes logic specific to a secondary page:
If Not IsModal() Or
Not (%Page = PAGE.PAY_OL_REV_RUNCTL Or
%Page = PAGE.PAY_OL_RE_ASSGN_C Or
%Page = PAGE.PAY_OL_RE_ASSGN_S) Then
Evaluate COUNTRY
When = "USA"
When = "CAN"
If Not AllOrNone(ADDRESS1, CITY, STATE) Then
Warning MsgGet(1000, 5, "Address should consist of at least Street (Line⇒
1), City, State, and Country.")
End-If;
Break;
When-Other;
If Not AllOrNone(ADDRESS1, CITY, COUNTRY) Then
Warning MsgGet(1000, 6, "Address should consist of at least Street (Line⇒
1), City, and Country.")
End-If;
End-Evaluate;
End-If;
Restrictions on Use With a Component Interface
This function is ignored (has no effect) when used by a PeopleCode program that’s been called by a Component Interface.
Related Topics