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

Overriding a calculation

Avatar

Level 1

I am trying to allow end users to manually override a calculation.  I have set Value Type to Calculated - User can override.  This however does not allow the end user to override.  I have not been able to understand the help instructions for this problem.  Can anyone assist me?

4 Replies

Avatar

Level 10

Hi,

It depends on where the calculation script is located.

Normally when you script in the calculate event of an object, it automatically makes it "calculated - read only". You can change this in the Object / Value tab to "calculated - user can override". This works where the calculation is in that object.

However if the calculation is in another object then the objects are bound and even though the user can override the answer. As soon as they leave the field, the calculation is fired again and the answer restored.

Example attached.

N.

Avatar

Level 1

So what I have is a rating review.  if you select the first box the employee receives a 0, if you select the second box the employee receives a 1 the third box a 2 and the fourth box a choice can be made to give the employee a 3 or a 4.  The score shows in a box on the side.  When the fourth box is selected a 3 appears and the end user cannot change it to a 4.  The script I am using is

if  (CsUn[0]) then dropdownlist1 = 0 elseif (CsNi[0]) then dropdownlist1 = 1 elseif (CsAel[0]) then dropdownlist1 = 2 elseif (CsEx[0]) then dropdownlist1 = 3 endif

The Un, Ni, Ae and Ex are the labels for the individual boxes.  This script is attached to a drop down list where the score appears.  Does this mean it cannot be overriden?

Avatar

Level 10

Hi,

The trouble with overriding calculation scripts is that if the user overrides and give a 4, then if they go back to one of the other boxes, the score will not be changed.

Where an object has a calculation in the calculate event and the object is set to allow the user to override it, then they should be able to do that. Without seeing the form it is difficult to see what your issues is.

Another option would be for a fifth choice to become visible allowing the user to give a score of 4, if they have already scored above 3. See attached. There is script in the change event of the radio buttons group and the radio buttons have a bound value.

Hope that helsp,

Niall

Avatar

Level 1

What would be the javascript to allow changing the value of the calculation in Adobe Acrobat?