[RDMLX] Bind a dropdown as a table column to SQL table

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
Taku Izumi
Posts: 12
Joined: Wed Jul 10, 2013 12:23 pm

[RDMLX] Bind a dropdown as a table column to SQL table

Post by Taku Izumi » Sun Aug 20, 2017 1:03 pm

HI,

Can bind a dropdown as a table column to SQL table?
I am trying to do it using this code. But, the result is a property unrecognized error.


#COM_OWNER.Set_Table Name(Table1) Layout_Col(1) Layout_Cols(-1) Layout_Row(3) Border_Cornerradius(10) Border_Thickness(1) Border_Color(Blue)
#COM_OWNER.Set_Table Name(Table1) Col_N(1) Col_Name(TBDD1) Col_Width(100) Col_Type(DropDown)
#COM_OWNER.Set_Label Name(Table1.Col%1.Header) Text('DropDown Column') Textalign(Center)

* Bind a dropdown to SQL table
#Com_Owner.Set_Binding Name('Table1.TBDD1.ItemTemplate') Property(Text) Bindtotype(FLD) Bindto('DDText')
#Com_Owner.Set_Binding Name('Table1.TBDD1.ItemTemplate') Property(Value) Bindtotype(FLD) Bindto('DDValue')

#Com_Owner.Set_Binding Name('TABLE1.ROW%1.TBDD1') Property(itemlist) Bindtotype(SQL) Bindto('SELECT DDText, DDValue FROM DDTable')
#Com_Owner.Set_Binding Name('TABLE1.ROW%2.TBDD1') Property(itemlist) Bindtotype(SQL) Bindto('SELECT DDText, DDValue FROM DDTable')
#Com_Owner.Set_Binding Name('TABLE1.ROW%3.TBDD1') Property(itemlist) Bindtotype(SQL) Bindto('SELECT DDText, DDValue FROM DDTable')


Regards,
Taku

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

Re: [RDMLX] Bind a dropdown as a table column to SQL table

Post by tsupartono » Wed Aug 23, 2017 10:08 am

The propery reference (Table1.TBDD1.ItemTemplate) in this line below doesn't look right:

Code: Select all

#Com_Owner.Set_Binding Name('Table1.TBDD1.ItemTemplate') Property(Text) Bindtotype(FLD) 
To refer to a column, you'd need to use COL%N property.
Try TABLE1.COL%1.Content.ItemTemplate

Code: Select all

#Com_Owner.Set_Binding Name('Table1.COL%1.Content.ItemTemplate') Property(Text) Bindtotype(FLD) 

Taku Izumi
Posts: 12
Joined: Wed Jul 10, 2013 12:23 pm

Re: [RDMLX] Bind a dropdown as a table column to SQL table

Post by Taku Izumi » Thu Aug 31, 2017 11:13 am

Hi

I tried to this code.

Code: Select all

#Com_Owner.Set_Binding Name('Table1.COL%1.Content.ItemTemplate') Property(Text) Bindtotype(FLD) 
However, it dose not be recognized a property.

This error message shows.

The error message is:
The following properties are not recognized:
FORM.FIELDS.TABLE1.COL%1.CONTENT.ITEMTEMPLATE.VALUE.$3.FLD
FORM.FIELDS.TABLE1.COL%1.CONTENT.ITEMTEMPLATE.TEXT.$3.FLD
FORM.FIELDS.TABLE1.ROW%1.TBDD1.ITEMLIST.$3.SQL
FORM.FIELDS.TABLE1.ROW%2.TBDD1.ITEMLIST.$3.SQL
FORM.FIELDS.TABLE1.ROW%3.TBDD1.ITEMLIST.$3.SQL


Best regards,
Taku

Post Reply