Using Logical Expressions in Formulas

Formulas can contain conditional expressions in the form of 'if – then' . In formula nomenclature, such expressions are described using square brackets: [Condition:Value] – if the Condition is satisfied, then the formula is given Value.
Conditional clauses can also be combined, e.g. [Condition1:Value1] [Condition2:Value2] [Condition3:Value3] Value4
- If Condition1, is met, then Value1, is different:
- If Condition2 is met, then Value2 is different:
- If Condition3, is met, then Value3, is different:
- If no condition is met, the value is Value4.
Primeri formul:
Formula |
Description |
#RPRICE# * 0,75
|
Multiplies the retail price by 0.75.
|
#RFACTOR# * #RHOURS#
|
Multiplies the factor from the payroll preparation by the hours from the payroll preparation.
|
[#KOL# > 100:#RPRICE#*0,8] #RPRICE#
|
If the quantity is greater than 100, then the price is Retail price – 20%, but if the condition is not met (i.e., the quantity is less than or equal to 100), then the price is Retail price.
|
 |
WARNING
The logical operators 'greater than or equal to' and 'less than or equal to' are written with two consecutive conditions. For example: the term 'if A is greater than or equal to B, the value of the term is 0, otherwise 1' in the formula is written as: [A>B:0] [A=B:0] 1.
|