DoModal
Mon 01 January 2018Syntax
DoModal(Page.pagename, title, xpos, ypos, [level, scrollpath, target_row])
In which scrollpath is:
[Record.level1_recname, level1_row, [Record.level2_recname, level2_row, ]] Record.target_recname
To prevent ambiguous references, you can also use Scroll. scrollname , in which scrollname is the same as the scroll levelâs primary record name.
Description
Use the DoModal function to display a secondary page in a modal, secondary window, which means that the user must dismiss the secondary window before continuing work in the page from which the secondary page was called. DoModal can display a single page modally. To display an entire component modally, use DoModalComponent. Alternatively, you can specify a secondary page in a command push button definition without using PeopleCode. This may be preferable for performance reasons.
Any variable declared as a component variable will still be defined after calling the DoModal function.
If you call DoModal without specifying a level number or any record parameters, the function uses the current context as the parent.
See .
Parameters
Field or Control |
Definition |
---|---|
pagename |
The name of the secondary page. |
title |
The text that displays in the caption of the secondary page. |
xpos |
The pixel coordinates of the top left corner of the secondary page, offset from the top left corner of the parent page (the default of -1, -1 means centered). |
ypos |
The pixel coordinates of the top right corner of the secondary page, offset from the top right corner of the parent page (the default of -1, -1 means centered). |
level |
Specifies the level of the scroll level on the parent page that contains the row corresponding to level 0 on the secondary page. |
scrollpath |
A construction that specifies a scroll level in the component buffer. |
target_row |
The row number of the row in the parent page corresponding to the level 0 row in the secondary page. |
Returns
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.