You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

DoModal

3 replies [Last post]
Guest's picture
Guest

Hi,
I am trying to understand domodal and request some inputs.

Per Peoplebooks, the syntax is:
DoModal(PAGE.pagename, title, xpos, ypos, [level, scrollpath, target_row])

If you call DoModal without specifying a level number or any record parameters, the function uses the
current context as the parent.

Thus, one could call domodal with and without specifying level.

1. When would one call domodal without specifying the level and when would one specify the level.
2. what should be the relationship between the record on the secondary page with the page from which the domodal is called in terms of key structure ?

CompShack's picture
User offline. Last seen 6 years 9 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Re: DoModal

Great question! This is how I understand it and please correct me if I'm wrong. You specify the level and scroll path to target a specific row on a scroll.

The scroll path you specify in the function is the targeted scroll level in the component buffer and the "level" is the scroll level on the main or parent page that relates to level 0 on the secondary page the DoModal function is opening. As far as your 2nd question, wouldn't this relationship be the same as any parent child relationship?

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Re: DoModal

Got a very clear explanation from another board:

The level of the secondary page (or push button/link) on the main page determines the level of the fields inside the secondary page. Remember that on a secondary page, fields start at level 0, but from a component buffer standpoint, they could be in level 1, 2 or 3 depending on where the sec page is.

Just as in your example, if a sec page is on level 2, then the level 0 fields in the sec page are also level 2, and level 1 fields on the sec page are level 3.

By not specifying level number on the DoModal() call, then it uses the current context as parent, for example, if your sec page or push button is at level 2, then to open the sec page which is also at level 2, you don't have to use a level number.

If your push button is at level 1, and your sec page is at level 2, then you have to specify level 2 and the scrollpath/target row.
I usually think of Secondary Pages as hidden extensions of a row, so to 'access' the fields inside a sec page, I have to tell the Component Processor which row I'm trying to access.

Sharing it with the board.

CompShack's picture
User offline. Last seen 6 years 9 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Re: DoModal

Thank you for doing that - I really appreciate it. Have a good day!

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog