cancel
Showing results for 
Search instead for 
Did you mean: 

Manual input into drop down list

Former Member
0 Kudos

Hi,

I have a requirement where user need to input data into 2 fields (ID and description) and then populate into a drop down list. I using javascript as follows to populate the data into the drop down list.

dropdownlist1.addItem(description.rawValue, ID.rawValue);

The drop down list is showing the values. But when i close and reopen the form, the newly added data in the drop down list is missing. Am i missing any steps?

Regards,

PY

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi PY,

yes, you are missing a step. You also need to store the key - values pairs in your data.

You need scripting to add the item to the ddl (you already have that) and to add it to the data. I would recommend also using dynamic properties to populate the ddl from data (when the form is opened).

This looks like a more complex use case and you might need to do some investigations how to exactly do this.

Regards,

Juergen

chintan_virani
Active Contributor
0 Kudos

Peng,

Try adding the script to form:ready event and check if it resolves the issue.

Chintan