[RDMLX]Offline parameter passing between forms

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
Posts: 260
Joined: Tue Feb 19, 2013 5:18 pm

[RDMLX]Offline parameter passing between forms

Post by MegumiSawada » Tue Aug 15, 2017 6:01 pm


Based on LREX0307 and LREX0308, I have created 2 offline forms and I was able to pass a binded field value between these forms(One form contains a table and one form contains textbox).

However, I would like to put a table on the second(child) form and select one row to pass back to the first(parent) form. It's like "popover prompter" on online example.

Could you please let me know how to set the current row value of table to a binded field on the second form so that it can pass back to the first form?
Image.png (54.95 KiB) Viewed 1299 times

Code: Select all

#Com_Owner.Set_TextBox Name(ProdNameX) Layout_Row(1) Layout_Col(1)
#Com_Owner.Set_Binding Name(ProdNameX) Property(VALUE) Bindtotype(FLD) Bindto('ProdNameX')

#Com_Owner.Set_Table Name(BOUND_TABLE) Layout_Row(2) Layout_Col(1) Layout_Cols(-1)
#Com_Owner.Set_Binding Name(BOUND_TABLE) Property(ROWLIST) Bindtotype(TBL) Bindto('ProdM')
#Com_Owner.Set_Binding Name(BOUND_TABLE) Property(ROWLIST) Bindtotype(SQL) Bindto('SELECT ROWID,ProdCode,ProdName FROM ProdM')
#Com_Owner.Set Property('BOUND_TABLE.COL%1.TYPE') To('Label')
#Com_Owner.Set Property('BOUND_TABLE.COL%1.NAME') To('ProdID')
#Com_Owner.Set Property('BOUND_TABLE.COL%1.HEADER.TEXT') To('商品コード')
#Com_Owner.Set_Binding Name('BOUND_TABLE.COL%1') Property(CONTENT.VALUE) Bindtotype(FLD) Bindto('ProdCode')
#Com_Owner.Set Property('BOUND_TABLE.COL%2.TYPE') To('Label')
#Com_Owner.Set Property('BOUND_TABLE.COL%2.NAME') To('ProdName')
#Com_Owner.Set Property('BOUND_TABLE.COL%2.HEADER.TEXT') To('商品名')
#Com_Owner.Set_Binding Name('BOUND_TABLE.COL%2') Property(CONTENT.VALUE) Bindtotype(FLD) Bindto('ProdName')
I appreciate your kind advice.

Best Regards,
Megumi Sawada

Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: [RDMLX]Offline parameter passing between forms

Post by tsupartono » Thu Aug 17, 2017 2:40 pm

You can attach an ECL event handler to the OnRowClick event of the child form.
In this event handler, you retrieve the value of the selected row ID, and store it in a shared state. Close the child form using the CloseForm operation.
As you return to the calling form, you retrieve the shared state value and populate your textbox with that value.

Note that in the OpenForm operation, you can specify an event handler that will get executed when the child form closes.
The OpenForm operation has event called OnReturn. This will be triggered when the child form is closed and control returns to the calling form.
The OnReturn event seems to be missing from the LongRange documentation - this will be rectified.

Post Reply