Hi Experts
I am trying to list all the items in dropdown list in livecycle designer form. I have got the items length but I am failed to get each items values.
Attached is the screenshot of my work.
Thanks in advance
Regards
arl
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The loop is nearly 100%, you are just missing the var in front of the i, to declare the variable.
// Declare variables
var sDD = null;
var nDD = DropdownList1.length;
// Loop through the dropdown items
for (var i=0; i<nDD; i++) {
sDD = sDD + DropdownList1.getDisplayItem(i) + ", ";
}
app.alert(sDD);
See an example here for accessing the bound and display values of dropdowns (and Listboxes): http://assure.ly/fYCuQ2.
Niall
Views
Replies
Total Likes
Hi,
The loop is nearly 100%, you are just missing the var in front of the i, to declare the variable.
// Declare variables
var sDD = null;
var nDD = DropdownList1.length;
// Loop through the dropdown items
for (var i=0; i<nDD; i++) {
sDD = sDD + DropdownList1.getDisplayItem(i) + ", ";
}
app.alert(sDD);
See an example here for accessing the bound and display values of dropdowns (and Listboxes): http://assure.ly/fYCuQ2.
Niall
Views
Replies
Total Likes
Thank you so much. This works.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies