Skip to Content

Logical functions : If, And, Or

Functions are used in the formulas for calculating the rate and amount of the Salary Types, as well as in the calculated columns of the Settlements.

If(condition;number1;number2)

Type returned Number or Boolean
Context Salary types, Settlements
Parameters Type Description
condition Test Expression to evaluate
number1 Formula or Number Result if true
number2 Formula or Number Result if false
Description

The condition is made up of 2 formulas or numbers connected by a comparison operator (=, <, >, ≤, ≥). If the condition is met, number1 is evaluated and returned. Otherwise, number2 is evaluated and returned.

Example

If(Birthday(65)=1;100;0)

allows an amount of 100 Frs to be allocated to employees who reach the age of 65 in the month.

And(condition1[;condition2]…[;conditionN])

Type returned Boolean
Context Salary types, Settlements
Parameter Type Description
condition1…2…N Test Expression to evaluate
Description 1 if all conditions are 1, otherwise 0.
Example

And(AgeThisMonth≥18;AgeThisMonth<65)

returns 1 if the employee's age is between 18 and 65 years.

Or(condition1[;condition2]…[;conditionN])

Type returned Boolean
Context Salary types, Settlements
Parameters Type Description
condition1…2…N Test Expression to evaluate
Description 1 if one of the conditions is met, otherwise 0.
Example

Or(And(AgeThisMonth>64;Woman);And(AgeThisMonth>65;Man))

returns 1 when the employee reaches the age of retirement.

Logical functions : If, And, Or