I thought the Simplified field would work for me, but it doesn't do what I think it should do.
I need to multiply a field names "Line3xLine4" and a field named "DiscountFactor" and have that sum divided by 100.
I tried the Simplified field and this is what I came up with:
This gives me a 0 as an answer.
Thanks again for the help!
White space is used to parse the field name, operands, and constants in the Simplified Field Notation. It also makes reading the code easier.
Also field formatting is important. If you "DiscountFactor" is formatted as a percentage and you have correct percentage value displaying do not divide by 100. The decimal place of the field has already been adjusted for calculations.
I'm not getting any errors, and I do not have the Discount Factor field formatted other than for 2 decimal places.
I need to either be able to divide the sum by 100 to make it an accurate $ number or be able to multiply "Line3xLine4" by "DiscountFactor" as a percentage. The users will enter the "DiscountFactor" field as a whole number, i.e. 97.5%.
Is there any easier way to do this?
There could be other issues since all fields with calculations interact with each other it is hard to see if there are other problems with your form.
Is the field order for the calculations correct?
What happens when additional data is added to the form?
Do you get the expected results?
Do you get the result expected before the additional data was added?
I can get the form to calculate properly if the user enters the percentage as a decimal. However, I will have hundreds of users and cannot rely on that being the case every time. So I need to be able to divide by 100 or somehow manipulate the number the users enter into a decimal value i.e. 97.5% = .975.
Well this is how Acrobat forms work.
If you want to have work differently, then you will have a lot of scripting for keystroke, formatting and calculations. Add the "%" sign to a value makes the value a string and not a number. The one exception is when it is added as a format item only.
You can use the "validate" tab to limit the range of values that can be entered and issue an warning and provide instructions on how to enter a percentage as a decimal number. This is just like using a 10 key adding machine and not using the "%" key.
They wouldn't be using the % sign, just entering 97.5 etc... Going down the validation route, how do I make it validate starting with a decimal? .975 for example?
Thanks for all the tips.