The DoModal function displays a secondary page. Secondary pages are modal, meaning that the user must dismiss the secondary page before continuing work in the page from which the secondary page was called.
DoModal(PAGE.pagename, title, xpos, ypos, [level, scrollpath, target_row])
Any variable declared as a Component variable will still be defined after using a DoModal function.
DoModal should not be used in the following peoplecode events:
Any PeopleCode event that fires as a result of a ScrollSelect, ScrollSelectNew, RowScrollSelect or RowScrollSelectNew function call.
Returns a number that indicates how the secondary page was terminated. A secondary page can be terminated by the user clicking a built-in OK or Cancel button, or by a call to the EndModal function in a PeopleCode program. In either case, the return value of DoModal is one of the following:
- 1 if the user clicked OK in the secondary page, or if 1 was passed in the EndModal function call that terminated the secondary page.
- 0 if the user clicked Cancel in the secondary page, or if 0 was passed in the EndModal function call that terminated the secondary page.
DoModal(PAGE.EDUCATION_DTL, MsgGetText(1000, 167, "EducationDetails - %1", EDUCATN.DEGREE), - 1, - 1, 1, RECORD.EDUCATN, CurrentRowNumber());
The EndModal function closes a currently open secondary page. It is required only for secondary pages that do not have OK and Cancel buttons. If the secondary page has OK and Cancel buttons, then the function for exiting the page is built in and no PeopleCode is required.
The following statement acts as an OK button:
The following statement acts as a Cancel button:
IsModal 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.
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
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.")
If Not AllOrNone(ADDRESS1, CITY, COUNTRY) Then
Warning MsgGet(1000, 6, "Address should consist of at least Street (Line 1), City, and Country.")
Post a Comment