Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Forms
Viewing all articles
Browse latest Browse all 61369

calculate withholding using percentage and amount

$
0
0

i have a dynamic form with three decimal fields:

 

grossamount (grossamount)

withholding percentage (fwpercent)

withholding amount (fwamount)

 

i have the following scripts:

 

 

form1.#subform[0].fwpercent::calculate - (FormCalc, client)

fwamount/grossamount*100

 

 

form1.#subform[0].fwamount::calculate - (FormCalc, client)

grossamount*fwpercent/100

 

I want to be able to change either the amount and/or the percent and have it calculate the other as shown in the scripts. If I open the form and plug in 100 for gross amount, then 10 for percent, the script works correctly and 10 is then shown in w/h amount. If I then go to the fw amount field and change it to 20, the percentage field still shows 10. the results are the same if I do amount first, it will then change the percentage value but won't update amount if I then update percentage. It only will work for whatever I do first. Can I get the fields to always be dependent on eachother every time one of them is changed?


Viewing all articles
Browse latest Browse all 61369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>