Using constants in Go Calc
One of the many powerful features available in Go Calc is user defined constants. When you are writing a formula you can refer to a variable or result in another calculation. One way you can use this is by defining commonly used constants. In this post I will show you how to define a constant for VAT (Value Added Tax, called Sales Tax in the US).
Here is a Go Calc freshly purchased from the App Store:
I am going to create a category (folder) to store my constants in. Simply tap the Edit button and choose New Category. I will name the category Constants.
Tap on the newly created Constants category and tap the Add (+) button to create a new calculation. This calculation will store the financial constants.
Click Save to start editing the calculation. In this example just one constant is going to be added. Tap the Add Variable button and we will add the VAT constant.
The variable name is VAT, a suffix % is added and two decimal places are to be shown.
Tap Save. You can now set the current VAT rate – double tap on the VAT variable (or tap the blue indicator)
I will now create a new calculation which will use this constant.
The calculation has a variable Price Exc VAT
*
*
… and then add a result which will work out Price Inc VAT. The formula refers to the constant defined earlier. To refer to a constant you need to describe the path needed to reach it. In this case the constant is in the Finance calculation, which is filed in the Constants category. So we write Constants.Finance.VAT (
Here is the example calculation in use.
Now if VAT changes you can change the constant and any calculation using it will automatically have the up-to-date value.
Happy Go Calc-ing!