Description

Passing DataWindows by reference is unsupported. 

Workaround

Define an instance variable and set its value as the data retrieved from the DataWindow, then pass this variable by reference to the function.

The same workaround should be used for passing DataWindows between two Tab controls in any window.  The modification made in the ancestor object has no effect on the child objects.  They should be modified separately.

Example #1

The original script:

(w_port_agent).dw_d_list.ue_retrieve
ldws_status = tab_1.tabpage_h_list.dw_h_list.GetItemStatus(ll_current,0,primary!)
IF ldws_status = datamodified! or ldws_status = NotModified!  THEN
...

Re-write it using the following format:

(w_port_agent).dw_d_list.ue_retrieve
ldws_status = idws_Status
(w_port_agent).dw_h_list.rowfocuschanged
idws_status = this.GetItemStatus(currentrow,0,Primary!)
(w_port_agent).dw_h_list.rowfocuschanged
IF idws_status = DataModified! or idws_status = NotModIfied!  THEN     
...

Example #2:

The original script:

w_port_agent.tab_2.tabpage_d_list.dw_d_list.ue_retrieve
ls_country = tab_1.tabpage_h_list.dw_h_list.getitemString(ll_current, "country_code")
ls_agent = tab_1.tabpage_h_list.dw_h_list.getitemString(ll_current, "stakeholder_code") this.retrieve(ls_country, ls_agent, gs_localdata)

Re-write it using the following format:

tab_1.tabpage_h_list.dw_h_list.rowfocuschanged
is_country = tab_1.tabpage_h_list.dw_h_list.getitemString(currentrow, "country_code")
is_agent = tab_1.tabpage_h_list.dw_h_list.getitemString(currentrow, "stakeholder_code")
tab_2.tabpage_d_list.dw_d_list.ue_retrieve
this.retrieve(is_country, is_agent, gs_localdata)

3
1