Creating Constants for storing Data

How to create a Constant in your Quoting Portal, and where they can be used

Creating a Constant

To create a new constant, click on Constants, which in turn lets you create a new constant.

It will now ask you what you want to name your Constant, its sub-slug (a unique identifier), its Data Type and the data you want to store in it.

It should look like following by default:

Give your constant a descriptive name, as you will very likely use the same Constant in multiple places, and eventually have multiple constants. In our example, we will name it "Hardened steel m2 price" and give it a value of "50". 

It could look like following:

Once you are done, click on + CREATE to save your newly created Constant and you should be able to see it underneath.

Different Data Types

There's different datatypes to choose from when creating a constant. More into that in this article.

Uses for Constants

As in our example, we could add multiple constants with different material names and their costs. Here are some example uses of Constants:

  • An hourly salary Constant of Data Type "number". This would let you update your hourly rate in one place, and have all your price calculations updated accordingly.
  • A base cost Constant of Data Type "number". This would let you adjust a fixed cost that may be used in multiple calculations.
  • An image Constant with Data Type "file-image" that will be used in multiple forms.