I’m new to the Solution Model paradigm - I’m trying to use the Solution Model to dynamically fill an existing combobox on an existing form - so far its not working.
My existing form is called ‘seis_set_query’, the existing combobox field is called ‘fv_current_search’
In this simple example I just want the value ‘Test1’ to show up in the combobox…
var lv_valuelist = solutionModel.newValueList('user_queries', SM_VALUELIST.CUSTOM_VALUES);
lv_valuelist.separator = '|';
lv_valuelist.customValues = 'Test1|bla';
var lv_form = solutionModel.getForm('seis_set_query');
var lv_field = lv_form.getField('fv_current_search');
lv_field.valuelist = lv_valuelist;
The code executes without error but there is no value in the combobox.
Can anyone spot the problem ?
Thanks in advance
Mark
------UPDATE------
I got this to work if I ran this code BEFORE the form was loaded/shown for the first time - it seems that it doesn’t work if the form is already loaded/shown.
The code I used is slightly different from what was originally posted…
var lv_valuelist = solutionModel.newValueList('user_queries', SM_VALUELIST.CUSTOM_VALUES);
lv_valuelist.separator = ' ';
lv_valuelist.customValues = 'Test1|bla1\r\nTest2|bla2';
var lv_form = solutionModel.getForm('seis_set_query');
var lv_field = lv_form.getField('fv_current_search');
lv_field.valuelist = solutionModel.getValueList('user_queries');