[RPG] - Bind Dropdown to SQL Table
Posted: Fri May 19, 2017 1:51 am
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();
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();