enableFilteringMode question

I have a combo with following setting:

cmbXYZ.enableFilteringModde(true,‘url’,true)

This works fine whilst I’m searching for the information. However later when I re-load the record containing the combo it obviously shows VALUE of field as there are no options within the combo itself to show Text.

What is recommended method of populating the combo with correct option without loading ALL options?

Thanks

Purvez

Hello,

you may use setComboText method:

combo.setComboText(text);

Yes, thanks that is a neat way of solving the problem.

Hi !

I have the same issue, and combo.setComboText(text) does not quite fix it.

I have a form which submits to the back end server. The server processes the form and redisplays the form, along with the results. Upon submission, the form is supposed to be pre-populated with the values entered upon previous submission.

Here is the problem :

I populate the combo box with a value
I submit the form
I get back the form with the combo box pre-populated with the previous value
I resubmit the form
I get back the form and the combox box has lost the value. Actually, the pre-populated value never made its way to the server upon resubmission.

So it seems that combo.setComboText(text) does not populate the combo box properly. Or am I doing something wrong ?

Thanks.

Hi,

to add an option in a combo, you may use the following approach:

combo.enableFilteringMode(true,url);
combo.addOption(value,text);
combo.selectOption(0);

Hi !

The problem is not to add a value. It is to remember the selected value. To do this, the script has to call combo.setComboValue(), not combo.setComboText().

So, my problem is solved.

Thanks.