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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Script not working correctly

mikewooz
Level 3
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 http://tinyurl.com/j4x9muh

1 Accepted Solution
arvindkumar7
Correct answer by
Level 3
Level 3
3 Replies
arvindkumar7
Level 3
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

Regards

Arvind

arvindkumar7
Correct answer by
Level 3
Level 3
mikewooz
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

and

      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 http://tinyurl.com/jzvl59u

Happy holidays Arvind!!

Mike