FAQ: How do I apply Sales Tax and Discounts to a calculated total?
With GoFormz you can easily eliminate manual math and opportunities for human error
Mobile forms are leveraged in many ways – among which are automations. Incorporating automations into everyday work processes not only helps streamline inefficient workflows but also improves productivity while eliminating costly delays and human error. One of the most commonly used “automatic” features is Automated Calculations.
What are Calculations?
Calculations allow your fields to perform anything from simple addition or multiplication to complex Conditional Logic – directly within your form. In other words, they perform actions based on data entered into a specific form field.
These Calculations are configured within the Template Editor, using the Calculation Builder. The Calculation Builder, which can be easily accessed from the Properties Panel, guides form builders through the addition of calculations. Within the Calculation Builder is an index of all available functions, fields, and variables GoFormz users can leverage within their form Template. As a user types a formula into the Calculation Builder’s Formula Bar, the list of available functions, fields, and variables truncates to only display those relevant to the entered formula – simplifying and streamlining the formula creation process.
The Calculation Builder also provides inline validation and error validation while a formula is being entered – highlighting problematic segments of the formula that require correcting. Once a formula has been created, users can easily test their formula and easily troubleshoot any issues with their Calculations.
Follow these simple steps to automatically apply discounts
Calculations are frequently used within Table fields. For this example, we will demonstrate how to automatically apply sales tax and discounts using a Table field (if you aren’t using a Table field this will not affect your equation).
First, create a few new Text fields and title them: “Discount Rate”, “Discount”, “Adjusted”, “Tax Rate”, “Tax”, and “Grand Total”. From here, we will configure our “Discount Rate”, which will automatically apply a discount to our total amount when a value is entered into the “Discount Rate” field. For this example, we will use a simple Text field, but this functionality can also be applied to Drop Down menus pulling information from a Database.
To get started, select your “Discount Rate” Text field. This field will represent the discount percentage that will be applied to the subtotal. Next, select the “Discount” field, navigate to the Default Value in the Properties Panel, and add the formula below:
=IF([Subtotal #] * [Discount Rate] >0, [Subtotal #] * [Discount Rate],"")
NOTE: [Subtotal #] represents the name of the field you are applying the discount too – be sure to adjust this variable to reflect the name used for your calculated total field.
Next, we’ll configure our “Adjusted” field to automatically apply the discount calculated above, by adding the following formula to the Default Value:
=IF([Subtotal #] - [Discount] >0, [Subtotal #] - [Discount],"")
Now, you have successfully applied a discount to your subtotal!
Follow these simple steps to apply sales tax
Continuing our example above, we will now apply sales tax. We will do so by selecting the “Tax” Text field (ProTip: use a Drop Down menu pulling from a Database of tax codes to eliminate opportunities for error and further streamline your calculation). This Text field will represent the tax value we will apply to our discounted total. (When applying tax remember to use decimals, e.g. California Sales tax is 7.25% which means .0725 would be the value you would input into the Text field).
With the “Tax” Text field selected, locate the Default Value and add the following formula (adjusting as needed for your specific tax rate):
=IF([Adjusted] * [Tax Rate] >0, [Adjusted] * [Tax Rate],"")
Finally, we can sum all the values calculated above to produce a grand total in the “Grand Total” Text field. In the Default Value of this Text field, add the following formula:
=IF(SUM([Adjusted],[Tax]) >0, SUM([Adjusted],[Tax]),"")
Congratulations! You have successfully automatically applied discounts and sales tax to your calculated total. Leveraging Automatic Calculations, users can seamlessly calculate grand totals without having to waste time on manual math – accelerating form completion, eliminating opportunities for human error, and streamlining your billing, quoting, and purchasing processes.
About GoFormz
GoFormz is the leading mobile forms automation and online form builder solution that helps bring your data to the digital realm – acting as a single source of truth. We believe introducing digital solutions should be seamless and result in simplified work experiences and elevate productivity. Whether you need work order forms or timesheets, GoFormz can bring your existing paper forms to the digital space – which no other digital solution can offer! Completed efficient features like automations and integrations, collected data can be instantly routed to existing tech stacks and available in real-time.