Popups and multiple data (OpenInsight Specific)
At 26 APR 2000 10:42:40AM Andy Becker wrote:
We have a table that contains the following fields: Region, District, Territory, RegionName and DistrictName.
The table's key is Territory.
We use this table in a popup, which displays all information. The user clicks the territory they want and it is placed in the edit window with no problem. What we want to do is to "flood" the windows for region and district at the same time, thus avoiding the user from having to enter those fields.
Simple question - How do we do it?
At 26 APR 2000 11:37AM Kim Ruane wrote:
Hi Andy,
In the click event for the button which calls the popup, you've probably got a set_property for the "Territory" field. After that, call send_event to the "READ" event of the window you're on. From there, you can use set_property to set any of the other fields you'd like.
eg
* from a button named 'Options' on the key field
DECLARE FUNCTION REPOSITORY, SEND_EVENT
WIN_NAME=CTRLENTID1, '.'
* repository key for the popup
REPOS_ID=@APPID:'*POPUP**BOOKS'
* call the popup
ID=REPOSITORY('EXECUTE', REPOS_ID, WIN_NAME)
IF LEN(ID) THEN
populate the key fieldX=SET_PROPERTY(WIN_NAME:'.BOOK_ID', 'TEXT', ID)
send the read eventX=SEND_EVENT(WIN_NAME, 'READ')END
RETURN 0
Hope this helps!
Kim Ruane
WinWin Solutions Inc.
At 26 APR 2000 11:53AM Andy Becker wrote:
Thanks Kim - we'll try it.