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."
- On the Calculation tab in the Field Settings, expand the first drop down and select "Quantity."
- Expand the second drop down and select "Unit Price."
- Click the plus sign to expand the functions and select Multiplication.
- Expand the Format drop down, select Currency, and click 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 + Add Value 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 expanding a Value drop down and selecting Add Constant.
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 into your form and label it "Tax."
- On the Calculation tab in the Field Settings, expand the first drop down and select "Total."
- Expand the second drop down and select Add Constant.
- Click Enter a number and type the decimal form of your percentage, i.e. 6% = 0.06 for this example.
- Click the plus sign to expand the functions and select Multiplication.
- Expand the Format drop down, select Currency, and click 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?
Please let us know by voting below. All we ask is if you downvote, please let us know how the content can be improved in the comments!
Comments
0 commentsPlease sign in to leave a comment.