Using the New Builder?
GoCanvas has the ability to calculate things for you, helping to eliminate mathematical errors and save you time.
Calculating Number Fields
There are endless possibilities and reasons for performing calculations in a form.
A common use of this field type is for calculating billable items such as time and materials. We'll use this example to show you how to set up successful calculations in a form.
First, we must determine the Total.
- Add a Number field to your form and label it "Quantity."
- Add another Number field into your form (or copy the previous field) and label it "Unit Price." In the Field Settings, change the Style to Currency.
- Add a Calculation field into your form and label it "Total."
- Under the Calculation section in the Field Settings, select Create Calculation.
- Select Unit Price for Operator 1.
- Select the Multiplication icon.
- Select Quantity for Operator 2.
- Toggle to Format to confirm it is set to Currency and select Done to close the modal.
The Total field will automatically multiply the Quantity and Unit Price fields for you.
You can add as many fields as necessary to achieve your end result. Simply select New Operator to add more fields and/or constants to the calculation.
Please Note
Calculation fields do not follow PEMDAS so in order to get the correct answer, be sure to build you calculations following these rules.
Calculating Fields with Constants
If you would like to calculate something using a constant (static) number, an easy way is to add a constant variable by selecting the Add Constant button.
For example, if you apply the same tax rate of 6% to all of your billable items, you can Add a Constant of 0.06 and multiply it with your Total field.
- Add a Calculation field from the field library into your form and label it "Tax."
- Under the Calculation section in the Field Settings, select Create Calculation.
- Select Total for Operator 1.
- Delete Operator 2 with the x in the right corner of the operator box, then add a New Operator.
- Select Constant, then enter the decimal form of your percentage (in this case 6% = 0.06).
- Select the Multiplication icon.
- Toggle to Format to confirm it is set to Currency and select Done to close the modal.
You can use multiple fields and constants in a single calculation field.
To get the grand total of your item total plus tax, you'll simply set up one more calculation field adding those two fields together.
Did we answer your question?
We'd really appreciate your feedback! Please leave your suggestions for improvement in the comments or let us know what you're looking for so we can assist you better. We want to help, but we need to understand your needs!
Comments
0 commentsPlease sign in to leave a comment.