Answered
Sara Kaplow, Community Manager
I am trying to calculate tax rates based off city, but every time the tax rate enters it automatically rounds up, and that can’t happen when doing taxes. I’m not sure if it’s even possible to change that within my own app, or if that’s something that needs to be changed within the entire system.
I have a spreadsheet with one column as cities, and the other column as their tax rates. When the tax rate populates from that spreadsheet into the app it automatically rounds it up.
Here's how that field is set up in the app builder:
0
Comments
Please sign in to leave a comment.
HI Sara,
Great question! All number, calculation, and summary fields have the ability to set the number of decimal places that a value will be rounded to. Therefore, if, like in this situation, you have your tax field configured to be "currency" style, it will round to 2 decimal places automatically. The problem here, is that your tax rates have values that go past two decimal places. For example, if your tax rate is 0.086, then when you do your calculation later in the app, because your tax rate field removed the values after the second decimal place 0.08, the value will not come out right on your output.
Instead, set the style of your number field to "number".
Then, go to "more" settings, and set the "decimal places" setting to the correct number of decimal places required.
Once you have done this, your calculations will no longer round the cost up or down.
For more information on the subject, check out our help topic on how to use calculation fields here: https://help.gocanvas.com/hc/en-us/articles/231963027-How-to-use-calculation-and-summary-fields-in-the-App-Builder