-
1. Re: Scripting & Applying Set Percentage in Javascript
Magus069 Mar 18, 2014 9:35 AM (in response to nharvell)To use a percentage in a total use these algorithm
Total * 1.0225 = Final Total
for 2.25%
to add a certain percentage
1.0225 = (2.25 / 100) +1
to remove a percentage
1 - (2.25 / 100) = 0.9775
to know a percentage of
2.25 / 100
-
2. Re: Scripting & Applying Set Percentage in Javascript
nharvell Mar 18, 2014 10:55 AM (in response to Magus069)Robert,
Great – thanks! I did figure that out (eventually), but now have the issue of the Permit Fee field showing $0.26 when it should just show $0.00 until the Number field is filled in and the amount is calculated. Can you help? The error screen says that it doesn’t like the last equal sign. I’m at a loss…
TopmostSubform.Page1.Cell[10].Permit_Fee::calculate - (FormCalc, client)
Permit_Fee.rawValue = (4000.00Cell[8].Number + 0.25)1.0225
If(Number.isNull | Permit_Fee = “”)
Thanks!
Noemi Harvell
-
3. Re: Scripting & Applying Set Percentage in Javascript
Magus069 Mar 18, 2014 11:07 AM (in response to nharvell)Because you are using FormCalc it has different operators for statements...
You can look over the FormCalc User Reference Documentation to understand the language
Your If statement would look something like this
if (Number.isNull | Permit_Fee eq "")

