Copy link to clipboard
Copied
Hi,
I need to create a calculation so that whatever is entered into the 'percentage uplift' box gets added to the 'subtotal own stock' and gives me a total. Do I need a javascript to do this? Should I keep the percentage uplift field a percentage or a number?
Hope you can help
Thanks
++Adding to the discussion,
I see that you have all the text field object names starting with a number.
I've read in other threads in this community that when you use simplified notation or the built-in "SUM" feature to calculate field values it may throw errors.
What I would do in this caseis to follow the same guidance that George Johnson already gave you but change the field names. In particular just eliminate the "5" that is preceding every field name in your PDF and see if that resolv
...Copy link to clipboard
Copied
You don't need to use JavaScript necessarily, unless you have specific rounding requirements. You could use the simplified field notation option when setting up a calculated field, and it would probably be best to set it to a number and configure the calculation correctly. For example, in the Totals field, the what you'd enter could be:
5OwnStockSubTotal * (1 + 5PercentageUplift / 100)
Assuming that's the correct formula.
Copy link to clipboard
Copied
Thnak you I think that has worked.
Copy link to clipboard
Copied
Ah, I have tested it again and it does not work for some reason.
Copy link to clipboard
Copied
If it appears to have worked at times but not others, it could be a problem with the field calculation order. If you're unaware of how to set it correctly, post again and include the version of Acrobat that you're using. Also, include more details about how it's not working.
Copy link to clipboard
Copied
Hi there, I originally put your calculation in the 'Plus percentage uplift' box, not the totals field. The calculation adds the number and not a percentage.
I need the left totals field to calculate the 'Sub total Own Stock' + 'Plus a percentage uplift' and the right totals field to calculate the figures on the right. The trouble I am having is, what calculation do I put in the 'Plus a percentage uplift' box to add what ever percentage they enter to te 'Sub total - own stock' to give a figure for 'Totals' box on the left.
The other issue I am having is that as you can see by the screen shot my calculation for the 'Grand Total Amount Insured' is not picking up the percentage uplift field. When I add it into the calculation it adds the amount to both totals, not just the one on the left.
I am using the latest Acrobat Pro DC software.
Many thanks
Copy link to clipboard
Copied
++Adding to the discussion,
I see that you have all the text field object names starting with a number.
I've read in other threads in this community that when you use simplified notation or the built-in "SUM" feature to calculate field values it may throw errors.
What I would do in this caseis to follow the same guidance that George Johnson already gave you but change the field names. In particular just eliminate the "5" that is preceding every field name in your PDF and see if that resolves the issue.
Copy link to clipboard
Copied
Thank you very much. That has made it work now.