Expand my Community achievements bar.

What formcalc script do I use to make the selection in a drop down list populate a numeric field?

Avatar

Level 1

https://nccer.box.com/s/ave99z5oq3avkixem9o13tdpjpyds156

I'm not sure what the script would be to make a selection in a drop down populate a cell with data.

In the case of the document I have at the hyperlink above, I am trying to make it so that when a customer is entering his or her shipping address, and if they choose FL, then the amount calculated in the "Subtotal" cell will be used to calculate the FL state sales tax (of 6%). How do I make a selection in the drop down list populate/calculate a numeric field? I'm only interested in designating the applicable sales tax for FL. All other states entered will not need to have a calculated tax.

I appreciate your help and thank you in advance!

1 Reply

Avatar

Level 10

Hi,

Try this code in the calculate event of the sales tax field

topmostSubform.Page1.Table1.Row15.Cell5::calculate - (FormCalc, client)

if (DropDownList1 == "FL") then

Row12.Cell5*0.06

else

0

endif

Regards

Bruce