Expand my Community achievements bar.

Dynamic Dropdown loses display text

Avatar

Former Community Member
I have a form (XDP) that contains dynamic dropdowns, some populated by scripting and some by data returned from a web service. In either instance, after the form is submitted, the dropdown only displays the value that was behind the dropdown text.



For example, a dropdown populated as:



Display            Value

"Choice A"      1

"Choice B"      2

"Choice C"      3



If the submitter chooses "Choice B" the next participant in the workflow will see "2" in the dropdown. They can't change the dropdown either, since only this value was saved, but I'm not really concerned about that. I need to retain the display text as well.



Why is only the value being saved and not the display text? This happens regardless of whether the submit button is configured to submit as XDP or PDF.
5 Replies

Avatar

Former Community Member
Do you need to give the dropdown items values? Could their names be values?

Avatar

Former Community Member
Yes the dropdowns require values as it is the values that will be written to a database.

Avatar

Former Community Member
It sounds like the item lists are not being populated after the initial submission of the form. This would explain why a user sees the un-translated value (the "2") instead of the display ("Choice B"). It would also explain why they cannot change the value because, if the list is empty and values are restricted to the list, the current field value cannot be changed.

Avatar

Former Community Member
>It sounds like the item lists are not being populated after the initial submission of the form.



That's correct. Why would they need to be populated after initial submission? I don't need them to and doing so would probably loose whatever selection was made by the submitter.

Avatar

Former Community Member
The value of the selected row's Display column ("Choice B", for example) is not stored in the field -- only the value of the selected row's Value column ("2") is. With the DDLB's item list loaded the form is able to translate "2" (Value) to "Choice B" (Display) so you see "Choice B". With the DDLB's item list empty there is no way to translate "2" to "Choice B" so you see "2".



If you do not want to save the DDLB's item list with the form you would need to preserve the selected row's Display column in another, possibly hidden, field then use that to display the translated Value.