These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Script required

Arti
Registered: Jan 22 2009
Posts: 4
Answered

Hi Everyone,

I'm new to scripting so I would like some assistance please.

I have 3 dropdown boxes that has the following codes listed 3G20, 3G21, 3G22 and depending on the code chosen, I would like to use these variables to calculate the form as per below.

Currently,

Dropdown box 1 populates TextField A with one of the codes
Dropdown box 2 populates TextField B with one of the codes
Dropdown box 3 populates TextField C with one of the codes

Please note that also NumericField 1, NumericField 2 and NumericField 3 will be values entered manually by user to be calculated.

Can anyone help me with a script to do the following?

Dropdown box 1

If TextField A = “3G20”, then enter NumericField 1 into NumericField 20
If TextField A = “3G21”, then enter NumericField 1 into NumericField 21
If TextField A = “3G22”, then enter NumericField 1 into NumericField 22

Dropdown box 2

If TextField B = “3G20”, then enter NumericField 2 into NumericField 20
If TextField B = “3G21”, then enter NumericField 2 into NumericField 21
If TextField B = “3G22”, then enter NumericField 2 into NumericField 22

Dropdown box 3

If TextField C = “3G20”, then enter NumericField 3 into NumericField 20
If TextField C = “3G21”, then enter NumericField 3 into NumericField 21
If TextField C = “3G22”, then enter NumericField 3 into NumericField 22

Then

Total all NumericField 20 amounts and enter total into TotalField 5
Total all NumericField 21 amounts and enter total into TotalField 6
Total all NumericField 22 amounts and enter total into TotalField 7

Thank you in advance,

Arti

My Product Information:
LiveCycle Designer, Windows
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi Arti,

Welcome to the forums. What you have asked for is a bit much for a question/answer forum such as this. It would take quite a lot of someone's time to cover everything you are asking for- first reading it all ( quite a long post) then digesting it and developing a solution. There are videos, tutorials, and articles here at Acrobatusers on using scripts in LiveCycle Designer forms. That is where you should start since you are new to scripting. If you go to the Learning Center and select LiveCycle and JavaScript you will find links to lots of resources to get you started.

Then, when you have worked through some of those and started creating your own scripts- this is the place to come back and ask questions about why a script won't work or what you need to add to your script to get it to work, etc. Bascially questions someone can answers in a few mintues, not hours since this is all volunteer effort.

Hope this helps,

Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
Arti
Registered: Jan 22 2009
Posts: 4
Hi Dimitri,

Thank you for responding to my forum question.

Apart from scripting, I'm also new to using forums as well.

I will take up your suggestion.

Once again, thank you very much.

Arti