Copy link to clipboard
Copied
Hello, I need to make a calculation but I need to claculate (divide) a Text Field with the lowest amounts entered from two different Text Field boxes in percentage. Is there a java script I could use?
Text Field 1 = Amount 1
/ Lesser Amount from two text fields
Text Field 2 = Amount 2
Text Field 3 = Amount 2
I need to clacaltue lesser amount between Text 1 and Text 2 to divide Text 3 with.
Copy link to clipboard
Copied
is this an acrobat question?
Copy link to clipboard
Copied
Yes, this is in PDF.
Copy link to clipboard
Copied
in the future, to find the best place to post your message, use the list here, https://community.adobe.com/
p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.
<"moved from using the community">
Copy link to clipboard
Copied
I don't see the division in your example, but you can find the lower amount like this:
var amount1 = Number(this.getField("Amount 1").valueAsString);
var amount2 = Number(this.getField("Amount 2").valueAsString);
var minAmount = Math.min(amount1, amount2);