Droplist with duplicated multiple bounded values - LC Designer ES3.5

Avatar

Avatar

Yasser__AST-IT_

Avatar

Yasser__AST-IT_

Yasser__AST-IT_

23-09-2013

Hi,

I'm trying to set (via js on the "Change" event) the value of text field (called "txtClientCurrency") with the selected item's bounded value in a droplist (called "droplistClientCountry").

temp_objects_1.png

The droplist contains the counteries and the binded values contains the currency code (e.g., SAR, EURO, US, etc...) and as you can imagine, some currencies are used by more than one country.

When I select, for example, "United State" from the droplist, the txtClientCurrency field is set correctly to "USD".

temp_selection_2.png

However, the droplist shows that the items I selected is "Ecuador"?!?

temp_result_3.png

I used the follwoing simple JScript to automate set value of the Currency edit box:

temp_script_4.png

What's the reason and how to avoid such behaivor?

BR,

Yasser

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

Yasser__AST-IT_

Avatar

Yasser__AST-IT_

Yasser__AST-IT_

23-09-2013

Hi Bruce,

Yup...I think this the way to go.

Maybe Adobe should look at this, because in real life, you could have one to many relationship between bounded values and selection items (like the countries/currency list)

Again,  thanks for the hel 🙂

BR,

Yasser

Avatar

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

23-09-2013

Hi Yasser,

That seems to be the way the dropdownlist (and the listbox) work, they need to have a unique bound value.  To avoid this you need to make the bound value unique but how depends on how it is popuplated in the first place.  Are they bound to a data source or populated in code.  If bound you could try having a hidden dropdownlist just for the currency code, set "specify item values" and match the two by their bound value.  If the dropdownlist is populated by code then maybe the bound value could be something like "United Stats_USD" and then when you populate txtClientCurrency you can use this.boundItem(selectedItem).split('_')[1].

Regards

Bruce