Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Script not working correctly


Level 3

I am not new to Livecycle Designer but I am trying my hand at learning JavaScript programming so that I can utilize it in my forms to make them more robust and powerful.  I have been practicing and I now have one that has me stumped.  I am able to populate the drop down, but I can't get the description or the price field to populate.  Could someone help me understand what I am doing wrong in getting the description and price fields not working (The description and price fields will not populate)?  The data is nothing more than a array of senseless info, but the senseless data does match in numbers

Thanks for any help.  The link to my file is

1 Accepted Solution


Correct answer by
Level 3
3 Replies


Level 3

HI Mile,

You did a very small mistake. Instead of looping through the array items you were trying to loop through the single variable. So that case in real does not exists.

See below image for answer.ANSWER.png




Correct answer by
Level 3



Level 3

Thanks Arvind .  I tried it the way you suggested, but it did not work.  I looked at the code again and noticed that my variable 'partNo' and the Function call 'whSize' were switched backwards... So instead of...

      if (partNo[i] == whSize)    which is what I needed... and changed to


      if(whSize[i] == partNo)    what I had originally

once I changed to the top one, it worked like a charm.  I didn't know that this would make a difference

Your examples caused me to think outside the box and give consideration for this change.

Thanks for your help and I look forward to your assistance in the near future

If you want, you can check out the corrections I made to the code at

Happy holidays Arvind!!