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

175

Likes

Translate

Translate

Report

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

correct answers 2 Correct Answers

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

Likes

Translate

Translate
Adobe Community Professional , 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

Translate

Translate
Adobe Community Professional ,
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

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
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.

Screen Shot 2021-04-21 at 10.02.33 AM.png

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
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

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
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?

 

Screen Shot 2021-04-21 at 10.31.18 AM.png

 

 

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Translate

Translate

Report

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

Copy link to clipboard

Copied

Don't use the calculation at the dropdown.

Likes

Translate

Translate

Report

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