About Calculation Formula Functions

Calculation formulas consist of a sequence of functions which are executed in the defined execution order. Those system defined functions can query information, manipulate existing values or create new records. Most functions are defined with a set of parameters which need to be provided when using the function. A special kind of functions are conditions which instead of parameters use a logical condition.

The function details and parameters are listed below.

Functions

Add Day for Recalculation:Depending on the chosen option, one or more days will be recalculated. When weekly or monthly option is selected, the days are always considered starting from the Account Date proceeding to the current calendar day. The recalculation will be executed within a background job.

ParameterDescriptionParameter OptionsMandatory parameter
OptionSelection options0 - recalculate given date
1 - recalculate weekly on given week day
2 - recalculate every day
3 - recalculate monthly on first given week day
4 - recalculate monthly on last given week day
5 - recalculate last day of month
Yes
DateDate to be recalculated, only
for Option 0
 No
Week DayWeek day to be recalculated,
only with Options 1, 3 or 4
1 - Monday
2- Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
No

Add Numbers: Adds the given values. If more than 2 summands are provided the operation will run step by step and add all given values (up to 4 values possible). At least two values have to be provided

ParameterDescriptionParameter OptionsMandatory parameter
Summand 1First value for addition Yes
Summand 2Second value for addition Yes
Summand 3Third value for addition No
Summand 4Fourth value for addition No

Add Number to Field: Add numeric values to a previously defined field (using function Field For Saving Numbers)

ParameterDescriptionParameter OptionsMandatory parameter
FieldField the value should be added to Yes
ValueValue to be added Yes

Add Result Hours: Add hours to a result wage code on the current account date. If the wage code does not exist in results yet, it will be created.

ParameterDescriptionParameter OptionsMandatory parameter
Wage HoursHours to be added Yes
Wage CodeWage Code that will be considered No
IndexIndex of the result table. Instead of providing
a wage code, also the index of the existing
result table can be provided. This can be used
when dynamic wage codes should be changed.
 No

Add to Periodic Result: Add hours with a defined Wage Code into periodic results. Existing records for the same period and wage code will be replaced. (Either Predefined Period or Period Begin and Period End have to be provided)

ParameterDescriptionParameter OptionsMandatory parameter
Wage HoursWage hours to be added Yes
Wage CodeWage code to be added Yes
Predefined PeriodPeriod to be added1 - First till last day of the month of the current account date
2 - One week including the current account date beginning from the given start day (Monday default)
3 - like 2 but ends always in same month
4 - current account date
No
Start DayStart day of the week1 - Monday
2- Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
No
Period BeginBegin data of the period No
Period EndEnd date of the period No

Cancel Calculation: Cancel the current calculation and leave the calculation rule, operations that have been completed until this point will not be rolled back.

 (no parameter)

Company Id: Retrieve the current Company ID.

(no parameter)

Date for next week day: Retrieve the date of the next occurrence of the specified week day.

ParameterDescriptionParameter OptionsMandatory parameter
Start DayDate to start searching (account date by default No
Week DayWeek day to be found1 - Monday
2 - Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
Yes
OptionIf the start day already corresponds to the searched
week day, it is possible to retrieve the following week instead
1 - Add one week
2 - Return Start Day (default)
No

Divide Numbers: Divides the provided values, the dividend will be divided by the divisor and the result will be considered as new dividend if more than 2 values are provided.

ParameterDescriptionParameter OptionsMandatory parameter
DividendDividend for the division Yes
Divisor 1First divisor for the division Yes
Divisor 2Second divisor for the division No
Divisor 3Third divisor for the division No

Emp Id: Retrieve the current Employee ID.

(no parameter)

Field for saving character strings: Create a field that can be used to save text.

(no parameter)

Field for saving numbers: Create a field that can be used to save numbers.

(no parameter)

Get Absence Category: Retrieve the absence category of the absence wage code as defined in Wage Code page.

ParameterDescriptionParameter OptionsMandatory parameter
Wage CodeAbsence Wage Code that will be considered Yes

Get Balance Value: Retrieve the value of the given time balance on the specified date

ParameterDescriptionParameter OptionsMandatory parameter
Balance IDBalance ID of the desired time balance Yes
DateValue date of the balance,
account date is considered by default
 No

Get Clockings Org Code: Retrieves the Org Code of the index-referred line of clockings.

ParameterDescriptionParameter OptionsMandatory parameter
IndexIndex of the clocking Yes

Get Company Property Number: Retrieve the numeric value for the company property on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Property CodeProperty code of the company property field Yes

Get Company Property Text: Retrieve the alphanumeric value for the company property on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Property CodeProperty code of the company property field Yes

Get Date of Employment: Retrieve the date of employment for the current employee on the current account date.

(no parameter)

Get Date of Leaving: Retrieve the date of leaving for the current employee on the current account date.

(no parameter)

Get Day Increment Type: Retrieve the day increment type on the current account date.

(no parameter)

Get Day Sched Code: Retrieve the schedule on the current account date.

(no parameter)

Get Day Type: Retrieve the schedule on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
OptionDefine which day type should be considered.
If no option is given, the day type which is
used in calculation will be retrieved.
DEV - Deviation Day Type
SUB - Substitute Day Type
ORD - Ordinary Day Typ
No

Get day value from date: Retrieves the day portion of a date as a number.

ParameterDescriptionParameter OptionsMandatory parameter
DateDate which will be converted
(Account date as default)
 No

Get Emp Property Number: Retrieve the numeric value for the employee property on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Property CodeProperty code of the employee property field Yes

Get Emp Property Text: Retrieve the alphanumeric value for the employee property on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Property CodeProperty code of the employee property field Yes

Get Flex Day Rule: Retrieve the flex day rule on the current account date.

(no parameter)

Get hours of Wage Code: Retrieve the hours of the defined Wage Code on a certain day.

ParameterDescriptionParameter OptionsMandatory parameter
Wage CodeConsidered Wage Code Yes
DayDay to be considered in relation
to the current account date. If no
value is provided, the account date
will be considered.
0 - Account date
1 - Day after account date
2 - Two days after account date
-1 - Day before account date
(any number can be used)
No

Get Last Day Of Month: Retrieves the last day of the given month

ParameterDescriptionParameter OptionsMandatory parameter
MonthDefine for which month the last day is required
(Month of account date as default)
1 - January
2 - February
3 - March
...
12 - December
No

Get month value from date: Retrieves the month portion of a date as a number.

ParameterDescriptionParameter OptionsMandatory parameter
DateDate which will be converted
(Account date as default)
No

Get Results Org Code: Retrieves the Org Code of the index-referred line of results.

ParameterDescriptionParameter OptionsMandatory parameter
IndexIndex of the result Yes

Get Rule Type: Retrieve the Rule Type on the current account date.

(no parameter)

Get Selection Group: Retrieve the Selection Group of the employee on the current account date.

(no parameter)

Get Scheduled Hours: Retrieve the scheduled hours on a certain day.

ParameterDescriptionParameter OptionsMandatory parameter
TypeDefine which day type should be considered.
If no option is given, the day type which is
used in calculation will be considered.
DEV - Deviation Day Type
SUB - Substitute Day Type
ORD - Ordinary Day Type
No
DayDay to be considered in relation
to the current account date. If no
value is provided, the account date
will be considered.
0 - Account date
1 - Day after account date
2 - Two days after account date
-1 - Day before account date
(any number can be used)
No

Get Seniority: Retrieve the value of the provided seniority on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Seniority IDSeniority ID to be considered Yes
DurationType of duration that should
be retrieved (Months by default)
Y - Years
M - Months
D - Days
No

Get Status: Retrieve the registration status of the current account date. (O - Open, S - Closed, H - Calculated, A - Manually)

(no parameter)

Get system date: Retrieve the current system date.

(no parameter)

Get the count of clockings: Retrieve the count of clocking lines on the current account date.

(no parameter)

Get the current account date: Retrieve the current account date.

(no parameter)

Get the index of a Result Wage Code: Retrieve the line index of a provided wage code.

ParameterDescriptionParameter OptionsMandatory parameter
Wage CodeResult Wage Code for which index
should be returned
 Yes

Get the time from date: Retrieves the time portion from a date/time.

ParameterDescriptionParameter OptionsMandatory parameter
DateDate which will be convertedYes

Get Wage Class: Retrieve the wage class on the current account date.

(no parameter)

Get week day from date: Retrieves the week day of a date as a number.

1 - Monday
2 - Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday

ParameterDescriptionParameter OptionsMandatory parameter
DateDate which will be converted
(Account date as default)
No

Get Work Location: Retrieve the work location of the employee on the current account date.

(no parameter)

Get Work Location Property Value Number: Retrieve the numeric value for the work location property on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Property CodeProperty code of the work location property field Yes

Get Work Location Property Text: Retrieve the alphanumeric value for the work location property on the current account date.

ParameterDescriptionParameter OptionsMandatory parameter
Property CodeProperty code of the work location property field Yes

Get Work Time Info: Retrieve work time information for the employee as defined in employee file.

ParameterDescriptionParameter OptionsMandatory parameter
TypeType of desired work time data
(If no value is provided it will be checked in the given order and the first to be found will be considered)
1 - Personal
2 - Adjusted
3 - Agreement
No
ValueDefines the kind of work time information that will be retrieved.1 - Hours per Year
2 - Hours per Month
3 - Hours per Week (Default)
4 - Hours per Day
5 - Days per Year
6 - Days per Month
7 - Days per Week
No
DateDate to be considered (Account date as default)No

Get year value from date: Retrieves the year portion from a date.

ParameterDescriptionParameter OptionsMandatory parameter
DateDate which will be converted
(Account date as default)
No

Get the in-stamp of a specific line: Retrieve the in-stamp of the specified interval record.

ParameterDescriptionParameter OptionsMandatory parameter
IndexIndex of the desired interval record
(starting with 1 for the first line of the day)
Yes

Get the out-stamp of a specific line: Retrieve the out-stamp of the specified interval record.

ParameterDescriptionParameter OptionsMandatory parameter
IndexIndex of the desired interval record
(starting with 1 for the first line of the day)
Yes

Get the Wage Code of a specific line: Retrieve the (absence) wage code of the specified interval record.

ParameterDescriptionParameter OptionsMandatory parameter
IndexIndex of the desired interval record
(starting with 1 for the first line of the day)
Yes

Get the Wage Group of a specific line: Retrieve the wage group of the specified interval record.

ParameterDescriptionParameter OptionsMandatory parameter
IndexIndex of the desired interval record
(starting with 1 for the first line of the day)
Yes

Multiply Numbers: Multiplies the given values. If more than 2 factors are provided the operation will run step by step and multiply all given values (up to 4 factors possible). At least two factors have to be provided.

ParameterDescriptionParameter OptionsMandatory parameter
Factor 1First factor for multiplication Yes
Factor 2Second factor for multiplication Yes
Factor 3Third factor for multiplication No
Factor 4Fourth factor for multiplication No

Round Number: Rounds the given value

ParameterDescriptionParameter OptionsMandatory parameter
ValueNumber that will be rounded Yes
TypeType of rounding1 - bank
2 - down
3 - up
Yes
AccuracyAccuracy of roundingYes

Save Number in Field: Saves a numeric value in a previously defined field (using function Field For Saving Numbers)

ParameterDescriptionParameter OptionsMandatory parameter
FieldField the value should be saved in Yes
ValueValue to be savedYes

Save Text in Field: Saves a alphanumeric value in a previously defined field (using function Field For Saving Characters)

ParameterDescriptionParameter OptionsMandatory parameter
FieldField the value should be saved in Yes
ValueValue to be savedYes

Set Result Hours: Sets the hours of a result wage code on the current account date. Existing values of the wage code will be overwritten.

ParameterDescriptionParameter OptionsMandatory parameter
Wage HoursHours to be written Yes
Wage CodeWage Code that will be written No
IndexIndex of the result table. Instead of providing
a wage code, also the index of the existing
result table can be provided. This can be used
when dynamic wage codes should be changed.
 No

Subtract Number from Field: Subtracts numeric values from a previously defined field (using function Field For Saving Numbers)

ParameterDescriptionParameter OptionsMandatory parameter
FieldField the value should be subtracted from Yes
ValueValue to be subtracted Yes

Subtract Numbers: Subtracts the given values. The subtrahend will be subtracted from the minuend and the result will be considered as new minuend if more than 2 values are provided.

ParameterDescriptionParameter OptionsMandatory parameter
MinuendMinuend for Subtraction Yes
Subtrahend 1First subtrahend for Subtraction Yes
Subtrahend 2Second subtrahend for SubtractionNo
Subtrahend 3Third subtrahend for Subtraction No

Subtract Result Hours: Subtracts hours from a result wage code on the current account date. If the wage code does not exist yet for the given account date, it will be created.

ParameterDescriptionParameter OptionsMandatory parameter
Wage HoursHours to be subtracted Yes
Wage CodeWage Code that will be considered No
IndexIndex of the result table. Instead of providing
a wage code, also the index of the existing
result table can be provided. This can be used
when dynamic wage codes should be changed.
 No

Subtract Result Hours with Limit 0: Subtracts hours from a result wage code on the current account date. If the result would be negative it will be set to 0 hours.

ParameterDescriptionParameter OptionsMandatory parameter
Wage HoursHours to be subtracted Yes
Wage CodeWage Code that will be considered No
IndexIndex of the result table. Instead of providing
a wage code, also the index of the existing
result table can be provided. This can be used
when dynamic wage codes should be changed.
 No

 

Conditions and special functions

IF-Condition

The IF-Condition is used to perform certain actions only under specified circumstances. It is possible to set the comparison for one or more logical comparisons for the condition. The logical connection of more than one condition can be done with "AND" and "OR". The following options are available to control the conditions.

FunctionEffectCondition
IF-ConditionThe steps following this function will be only executed if the given condition is true.Yes
ELSE-ConditionThe steps following this function will be only executed if the condition from the previous IF/ELSIF-Condition is false.No
ELSIF-ConditionThe steps following this function will be only executed if the condition from the previous IF-Condition is false and the current given condition is true.Yes
END IF-ConditionThe steps following this function will be executed regardless the previous IF-Condition. (Every IF-Condition requires an END IF-Condition to end the condition, also when no further steps are to be executed)No

Loops

Loops can be used to run the same functions with different parameters (e.g. for different days). It is possible to set loops with or without conditions. When loops are set up without condition it is necessary to define when the loop has to be ended manually. In both cases the maximum number of loops is 1000.

FunctionEffectCondition
Loop with conditionThe steps following this function will be executed in a loop as long as the given condition is true.Yes
Loop without conditionThe steps following this function will be executed in a loop until the loop is exited.No
End of Loop with conditionThe steps following this function will be executed after the condition of the loop is false. (Every Loop with condition requires an End of Loop with condition - function, also when no further steps are to be executed)Yes
End of Loop without conditionThe steps following this function will be executed after the previous loop without condition is exited. (Every Loop without condition requires an End of Loop without condition - function, also when no further steps are to be executed)No
EXITThe EXIT function is used to leave the current loop. If a loop is used without condition, this function must be used to exit the loop.No

Cancel

The function Cancel is used to leave the entire calculation formula. All changes made by operations that have been executed before will not be rolled back.