VL_ONE Pop-Up window: Receiving back a value from a pop-up window
Posted: Sat Feb 26, 2022 3:49 am
I have a main window screen that has several fields. When user double-clicks one of the fields then a pop-up window with a drop-down selection should be shown. I would pass the value of the field to the pop-up selection window and user can then select from the drop-down and the selected value should be sent back to the main screen. Somehow the value returned to the main screen has been incorrect; It shows a value that is not even in the selection list.
I hope I can get some help here. Thank you in advance!
Below are my codes (Related sections only)
Main screen
Define_Com Class(#Dropdown_Selection_PopUp) Name(#Dropdown_Selection_PopUp)
Evtroutine Handling(#GroupCode.DoubleClick)
#Dropdown_Selection_PopUp.uExecute Parm1(#GroupCode)
Endroutine
Evtroutine Handling(#Dropdown_Selection_PopUp.uConfirmClicked)
#Dropdown_Selection_PopUp.ClosePopup
Endroutine
Pop-Up window
Define_Evt Name(uExecute)
Define_Evt Name(uConfirmClicked)
Define_Evt Name(uClosePopUp)
* Dropdown List
Define_Com Class(#PRIM_LIST.DropDown) Name(#GroupCodeSelectionList) Columnheaderheight(0) Columnlines(False) Displayposition(2) Left(24) Parent(#Panel2) Rowlines(False) Tabposition(2) Top(64) Width(417) Height(25)
Define_Com Class(#PRIM_LIST.String) Name(#GRCD) Columnunits(Proportion) Columnwidth(10) Displayposition(1) Parent(#GroupCodeSelectionList) Source(#GRCD) Sortposition(1)
Define_Com Class(#PRIM_LIST.String) Name(#GRNM) Columnunits(Proportion) Columnwidth(50) Displayposition(3) Parent(#GroupCode1SelectionList) Source(#GRNM)
Mthroutine Name(uExecute)
Define_Map For(*BOTH) Class(#Parm1) Name(#GroupCode)
*Codes for generating the selection list
Endroutine
Evtroutine Handling(#ConfirmButton.Click)
#GroupCode := #GRCD
Signal Event(uConfirmClicked)
Signal Event(uClosePopUp)
Endroutine
Here are some points that I have verified:
• The parameter passed correctly from the main screen to the pop-up window
• The drop-down list shows the correct selected item based on the parameter passed
• The value selected from the list is correct; #GRCD is showing the correct value just before the pop-up window signals the uConfrmClicked
• The value received back in the main screen is incorrect
I hope I can get some help here. Thank you in advance!
Below are my codes (Related sections only)
Main screen
Define_Com Class(#Dropdown_Selection_PopUp) Name(#Dropdown_Selection_PopUp)
Evtroutine Handling(#GroupCode.DoubleClick)
#Dropdown_Selection_PopUp.uExecute Parm1(#GroupCode)
Endroutine
Evtroutine Handling(#Dropdown_Selection_PopUp.uConfirmClicked)
#Dropdown_Selection_PopUp.ClosePopup
Endroutine
Pop-Up window
Define_Evt Name(uExecute)
Define_Evt Name(uConfirmClicked)
Define_Evt Name(uClosePopUp)
* Dropdown List
Define_Com Class(#PRIM_LIST.DropDown) Name(#GroupCodeSelectionList) Columnheaderheight(0) Columnlines(False) Displayposition(2) Left(24) Parent(#Panel2) Rowlines(False) Tabposition(2) Top(64) Width(417) Height(25)
Define_Com Class(#PRIM_LIST.String) Name(#GRCD) Columnunits(Proportion) Columnwidth(10) Displayposition(1) Parent(#GroupCodeSelectionList) Source(#GRCD) Sortposition(1)
Define_Com Class(#PRIM_LIST.String) Name(#GRNM) Columnunits(Proportion) Columnwidth(50) Displayposition(3) Parent(#GroupCode1SelectionList) Source(#GRNM)
Mthroutine Name(uExecute)
Define_Map For(*BOTH) Class(#Parm1) Name(#GroupCode)
*Codes for generating the selection list
Endroutine
Evtroutine Handling(#ConfirmButton.Click)
#GroupCode := #GRCD
Signal Event(uConfirmClicked)
Signal Event(uClosePopUp)
Endroutine
Here are some points that I have verified:
• The parameter passed correctly from the main screen to the pop-up window
• The drop-down list shows the correct selected item based on the parameter passed
• The value selected from the list is correct; #GRCD is showing the correct value just before the pop-up window signals the uConfrmClicked
• The value received back in the main screen is incorrect