Formulas

Formulas are used in several places in the configurator and the thing they have in common is the use of variables to perform calculations. The formulas are basically used in two ways:

  • To calculate values.
  • To analyze if a term is true or false.

The different formulas you can create are determined by the different types of variables that exist. These can be Text, Number, Boolean, and Date. The different types of formulas that exist are:

  • Time formulas – Used for operations to calculate unit times and setup times.
  • Quantity formulas – Used to calculate quantity and setup quantity for materials.
  • Price formulas – Used to calculate prices for included/incorporated parts and can also be used for flexible pricing of main parts (the parts you configure).
  • Variable formulas – Used on variables to calculate values on variables.
  • Instruction formulas – Used to calculate values which should be displayed in an instruction.
  • Rule formulas – Used in rules when you want to create terms which apply variables. These formulas always result in "true" or "false".

You create the formulas in a formula editor on the records when formulas can be created. You access the formula editor by clicking the button Formula . When there already exists a saved formula, you will see a different symbol on the button .

The formulas are constructed as logical and mathematical expressions of available variables, operators, terms, and functions. Under the Use (times) column, you can see how many times a variable has been used in a formula.

For all different types of formulas (except for variable formulas and rule formulas) you add one or multiple configuration groups in the formula editor (to see the available variables) and you select/add a formula number for each configuration group. You can add more formula numbers and create different formulas for these in the formula editor. You can also choose to use the same formula number for multiple configuration groups.

Different validations are made in the formula editor. Validations are for example made to make sure the result of the formula is of the right type, e.g. a number or a text. Validations are made to see that the entered variables exist, for example if a formula is copied from one material row to another material row and that a configuration group is selected in the formula editor. If validation errors occur, what is wrong will be displayed in red text. Then you cannot save the formula using the OK button in the formula editor until you have corrected the problem.