Expand my Community achievements bar.

Help with FormCalc If/Else if statement

Avatar

Level 1

Good Morning,

I have the following form designed in Adobe LiveCyle.

Capture.JPG

Each of the score Sections In brown are set up as global references to fill in the matching score in tthe total Score section.

I then have a Form Calc set up for total score to calculate the scores...

 

Total_Score.rawValue

=Utilization.rawValue+Reward.rawValue+Risk.rawValue+

Realization.rawValue

My problem comes when I try to set up an if/elseif statement for the grade.

Here is what I currently have:

Capture2.JPG

I'll be honest with you that I have NO IDEA what I am doing. what i've done i've learned from Adobe videos. Could some one help me in making this work?

2 Replies

Avatar

Level 4

First off welcome to the boards Vikki.

Second while I do champion Livecycle users understanding FormCalc and Javascript; often times for us newbies it is easier to use the Action Builder. If you are using Windows then at the top toolbar go to "TOOLS" then select "ACTION BUILDER" from the drop down box. The Action Builder is a good way to quickly add functions to your PDF without the need for knowing code. What you do is click the "NEW ACTION" button at the top and the box that is open will split into 2 sections: a condition and a result. From the condition click the "OBJECT" hyperlink and then select your score grade field. Then you should see something that says "When numeric field Total Score is" and then some drop down boxes. Simply select from the drop down box to whatever property meets your needs (is, more than, less than, ect.,) and enter the necessary score. Then in the result section select the drop down box and then select "Set the value of a field", select your Grade field and set it to "to be" and enter what you want the grade to be based upon that score. After you build the first one, just build the others that you want and the grade should change as the score does to. While it is not as pretty as coding and it does require a few more steps, using the Action Builder can allow newbies to add in a lot of functions into a PDF very easily without coding. I have been using Livecycle for years now and I honestly some times when I hide sheets or fields or want fields to change based on other fields I just use the Action Builder. It is quicker for me instead of typing in all of the code. If you have some questions let me know or if you use Acrobat.com you can upload your sheet and I could alter it for you. 

Avatar

Level 6

Try this (this is javascript on the validate event):

if

(this.rawValue > "17")

{Grade.rawValue="A";}

endif