Hiya all! I am currently creating a form in Acrobat that includes calculation. The form looks like this:
1 Box Sqft Total Sqft Boxes Required Total Box Sqft
21.74 90 4 (Boxes Required) * (1 Box Sqft)
Using simplified field notation, I have set Boxes Required based on the total sqft entered, which is (Total Sqft) / (1 Box Sqft). However, I encounter a problem when entering the formula above for Total Box Sqft. Upon keying in the formula, the answer would just be following Total Sqft. So for example, if the Total Sqft was 100, Total Box Sqft would also be 100 despite of the (Boxes Required) * (1 Box Sqft) formula which rightfully should be 86.96.
I suppose that this has to do with the fact that Boxes Required already has an existing formula which interferes with a new formula set in Total Boxes Sqft. Is there a method to solve this issue?
Thank you in advance for all your help!
You need to fix the fields calculation order. You can do that in Prepare Form mode, via the More button.
Set "Total Box Sqft" to be lower in the list (ie. calculate after) "Total Sqft".
Hi try67, thanks for your prompt assistance! I have checked the Field Calculation order and "Total Box Sqft" is set lowest in the list. Still getting the same values as "Total Sqft" unfortunately.
Odd. Can you share the file with us?
I don't understand the issue... You've set "Boxes Required" to be "Total Sqft"/"1 Box Sqft" and "Order Quantity" as "1 Box Sqft" * "Boxes Required", so of course the result will be the same as "Total Sqft". Am I missing something here? The only issue is you've set Boxes Required to not show any decimals, so the value it displays does not correspond to its actual value, which is what's used in the calculation. Is that what you're referring to?
I think I understand... Add the following as the custom Validation code of "Boxes Required":
event.value = Math.floor(event.value);
Yes, you're correct! My initial issue which I didn't realise was setting "Boxes Required" not to show decimals which in turn displayed the wrong value. The custom validation code works perfectly to resolve that issue. I appreciate your time and assistance once again, try67!