# Can you set multiple values in a dropdown to calculate different tax percentages?

New Here ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Hi, I'm building a form that needs to calculate muliple percentages in a dropdown. I have an amount field called "AMOUNTRow1" a Dropdown field that should calculate different percentages and a total field called "TOTALRow1" (Example if the amount field says \$20 I want to use the dropdown to get the tax percentage of 6.25%, 8.5% or 8.25%, and then have the total amount in \$\$. I'm not familar with custom javascript calculations. Is this even possible to give one cell muliple values?

TOPICS
JavaScript

Views

168

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

## 2 Correct Answers

Adobe Community Professional , Apr 21, 2021 Apr 21, 2021
Don't use the calculation at the dropdown.

Likes

Most Valuable Participant , Apr 21, 2021 Apr 21, 2021
Again, the calculation needs to take place in another field, the Total one in this case. Also, if you want the total to display the amount plus the tax then you need to set the export value of the "6.25%" item in the drop-down to 1.0625, instead of 0.0625, for example.

Likes

6 Replies 6
Most Valuable Participant ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

With a drop-down field it is, yes. You can set the export value of each item in it to a different number, and then just multiply it by the value of the Amount text field. For example, for "6.25%" set the export value to "0.0625" (without the quotes).

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

I gave each dropdown it's respective decimal value and told it to muliply that number with Amount text field, but it only calculated one.  It will just calculate the first multiplication, which is the 6.25. When I click the 8.5 in the dropdown it still gives me the 6.25% calculation.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

You have to set these values under the Options tab, and then use the Calculate tab of another field to multiply the drop-down field by the amount text field.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Okay, the values are set in the options tab. In the simplified field notation, I have it as AMOUNTRow1*Dropdown1, which worked until I went to the next row and typed a number in and the Tax field above it changed to 34.00?? Why?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Again, the calculation needs to take place in another field, the Total one in this case.

Also, if you want the total to display the amount plus the tax then you need to set the export value of the "6.25%" item in the drop-down to 1.0625, instead of 0.0625, for example.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Don't use the calculation at the dropdown.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Resources