Expand my Community achievements bar.

Calculations

Avatar

Level 2

I need to have one field open where a person can enter a salary and it multiplies that by 26 weeks and puts it inco a closed field that they can see. Can someone please point me in the right direction to do this?

Thanks in advance,

Misti

2 Replies

Avatar

Level 10

Hi,

You need to drag two objects onto the page, numericFields would be best for this.

In the hierarchy, name the objects so that they match their purpose.

Then open the script editor (available from the Window menu). In the script editor you can write script against a number of different events. There are two choices for the scripting language: FormCalc and JavaScript.

If you select the object that you want the calculation in and in the script editor select the 'calculate event'. Here is an example of a FormCalc script:

$ = salary * 26

In Javascript it would look like this:

this.rawValue = salary.rawValue * 26; 

Parallels Desktop1.png

Here is an example:

https://acrobat.com/#d=Cuk66LP2TFt5ZeEdseMH4Q

Hope that helps,

Niall

Avatar

Level 2

Thank you so much! That was a huge help!