Page 1 of 1

[RPG] - Bind Dropdown to SQL Table

Posted: Fri May 19, 2017 1:51 am
by mwilliams
I was hoping somebody could confirm that this is the proper way to bind a dropdown to a sql table. There is not any documentation for ItemList or ItemTemplate in the online documentation that I could find so I just wanted to be sure.

Lrng_using(‘/form.fields.ordersList’);
lrng_setProperty('ItemList.&.Tbl': 'HZPTSHP');
lrng_setProperty('ItemList.&.Sql'
:'SELECT ROWID, HZNO14 from HZPTSHP');
lrng_setProperty('ItemTemplate.Text.&.Fld' : 'HZNO14');
lrng_setProperty('ItemTemplate.Value.&.Fld' : 'HZNO14');
lrng_endusing();

Re: [RPG] - Bind Dropdown to SQL Table

Posted: Fri May 19, 2017 10:34 am
by tsupartono
Yes that looks correct to me.