Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

If ElseIf Statments

Avatar

Level 1

I need to add the Sales Tax for a state in a dropdown box to a numeric field.

1 Reply

Avatar

Level 7

Hi,

Your description is a bit vague but if i understand correctly, you can use a button to make the calculation. I havent included any logic to protect against empty fields.

form1.#subform[0].btnCalculate::click - (FormCalc, client)

grandTotal = subTotal + (subTotal * (salesTaxCbo / 100))

Assuming:

salesTaxCbo - Checkbox prefilled with tax percentage

subTotal - Numeric field

grandTotal - Numeric field which gets calculated amount.

btnCalculate - The button to calculate the grand total

1311758_pastedImage_3.png

----------------------------------------------------------

1311745_pastedImage_2.png

-----------------------------------------------------------

1311759_pastedImage_4.png