I’ve got my dynamic combobox populate working with a custom value list (and there was great rejoicing amongst the programming staff).
What I would like to do now is render the value list so that there is no empty value appearing in the combobox - currently there is a ‘blank’ value showing up in the combobox.
I’ve tried setting the valuelist’s “.addEmptyValue” to 1 (and 0) and neither setting seems to make a difference - the result is a ‘blank’ value in the combobox.
var lv_valuelist = solutionModel.newValueList('user_queries', SM_VALUELIST.CUSTOM_VALUES);
lv_valuelist.separator = ' ';
lv_valuelist.addEmptyValue = 1; // this is supposed to keep an empty value from appearing in the list
// but it doesn't seem to work
var lv_values = globals.bizlogic_getSavedQueries(security.getUserName(), controller.getServerName());
lv_valuelist.customValues = lv_values;
var lv_form = solutionModel.getForm('seis_set_query');
var lv_field = lv_form.getField('fv_current_search');
lv_field.valuelist = solutionModel.getValueList('user_queries');
Probably stupid comment but is the ‘Allow empty value’ checkbox checked? Or is this different when using the Solution Model? Is it necessary to use the Solution Model for this?
Probably stupid comment but is the ‘Allow empty value’ checkbox checked?
Or is this different when using the Solution Model?
It is different, with the solution model everything is coded. So the property is the same as using the checkbox in the designer.
Is it necessary to use the Solution Model for this?
Very good question. They should both have equal functionality so it is not really an alternative to bypass the issue. And no, it is not really necessary to use the solution model for this.