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.

Parameter Description Parameter Options Mandatory parameter
Option Selection options 0 - 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
Date Date to be recalculated, only
for Option 0
  No
Week Day Week 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

Parameter Description Parameter Options Mandatory parameter
Summand 1 First value for addition   Yes
Summand 2 Second value for addition   Yes
Summand 3 Third value for addition   No
Summand 4 Fourth value for addition   No

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

Parameter Description Parameter Options Mandatory parameter
Field Field the value should be added to   Yes
Value Value 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.

Parameter Description Parameter Options Mandatory parameter
Wage Hours Hours to be added   Yes
Wage Code Wage Code that will be considered   No
Index Index 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)

Parameter Description Parameter Options Mandatory parameter
Wage Hours Wage hours to be added   Yes
Wage Code Wage code to be added   Yes
Predefined Period Period to be added 1 - 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 Day Start day of the week 1 - Monday
2- Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
No
Period Begin Begin data of the period   No
Period End End 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.

Parameter Description Parameter Options Mandatory parameter
Start Day Date to start searching (account date by default   No
Week Day Week day to be found 1 - Monday
2 - Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
Yes
Option If 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.

Parameter Description Parameter Options Mandatory parameter
Dividend Dividend for the division   Yes
Divisor 1 First divisor for the division   Yes
Divisor 2 Second divisor for the division   No
Divisor 3 Third 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.

Parameter Description Parameter Options Mandatory parameter
Wage Code Absence Wage Code that will be considered   Yes

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

Parameter Description Parameter Options Mandatory parameter
Balance ID Balance ID of the desired time balance   Yes
Date Value 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.

Parameter Description Parameter Options Mandatory parameter
Index Index of the clocking   Yes

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

Parameter Description Parameter Options Mandatory parameter
Property Code Property code of the company property field   Yes

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

Parameter Description Parameter Options Mandatory parameter
Property Code Property 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.

Parameter Description Parameter Options Mandatory parameter
Option Define 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.

Parameter Description Parameter Options Mandatory parameter
Date Date 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.

Parameter Description Parameter Options Mandatory parameter
Property Code Property code of the employee property field   Yes

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

Parameter Description Parameter Options Mandatory parameter
Property Code Property 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.

Parameter Description Parameter Options Mandatory parameter
Wage Code Considered Wage Code   Yes
Day Day 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

Parameter Description Parameter Options Mandatory parameter
Month Define 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.

Parameter Description Parameter Options Mandatory parameter
Date Date which will be converted
(Account date as default)
No

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

Parameter Description Parameter Options Mandatory parameter
Index Index 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.

Parameter Description Parameter Options Mandatory parameter
Type Define 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
Day Day 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.

Parameter Description Parameter Options Mandatory parameter
Seniority ID Seniority ID to be considered   Yes
Duration Type 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.

Parameter Description Parameter Options Mandatory parameter
Wage Code Result Wage Code for which index
should be returned
  Yes

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

Parameter Description Parameter Options Mandatory parameter
Date Date which will be converted Yes

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

Parameter Description Parameter Options Mandatory parameter
Date Date 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.

Parameter Description Parameter Options Mandatory parameter
Property Code Property 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.

Parameter Description Parameter Options Mandatory parameter
Property Code Property code of the work location property field   Yes

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

Parameter Description Parameter Options Mandatory parameter
Type Type 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
Value Defines 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
Date Date to be considered (Account date as default) No

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

Parameter Description Parameter Options Mandatory parameter
Date Date 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.

Parameter Description Parameter Options Mandatory parameter
Index Index 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.

Parameter Description Parameter Options Mandatory parameter
Index Index 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.

Parameter Description Parameter Options Mandatory parameter
Index Index 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.

Parameter Description Parameter Options Mandatory parameter
Index Index 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.

Parameter Description Parameter Options Mandatory parameter
Factor 1 First factor for multiplication   Yes
Factor 2 Second factor for multiplication   Yes
Factor 3 Third factor for multiplication   No
Factor 4 Fourth factor for multiplication   No

Round Number: Rounds the given value

Parameter Description Parameter Options Mandatory parameter
Value Number that will be rounded   Yes
Type Type of rounding 1 - bank
2 - down
3 - up
Yes
Accuracy Accuracy of rounding Yes

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

Parameter Description Parameter Options Mandatory parameter
Field Field the value should be saved in   Yes
Value Value to be saved Yes

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

Parameter Description Parameter Options Mandatory parameter
Field Field the value should be saved in   Yes
Value Value to be saved Yes

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.

Parameter Description Parameter Options Mandatory parameter
Wage Hours Hours to be written   Yes
Wage Code Wage Code that will be written   No
Index Index 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)

Parameter Description Parameter Options Mandatory parameter
Field Field the value should be subtracted from   Yes
Value Value 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.

Parameter Description Parameter Options Mandatory parameter
Minuend Minuend for Subtraction   Yes
Subtrahend 1 First subtrahend for Subtraction   Yes
Subtrahend 2 Second subtrahend for Subtraction No
Subtrahend 3 Third 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.

Parameter Description Parameter Options Mandatory parameter
Wage Hours Hours to be subtracted   Yes
Wage Code Wage Code that will be considered   No
Index Index 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.

Parameter Description Parameter Options Mandatory parameter
Wage Hours Hours to be subtracted   Yes
Wage Code Wage Code that will be considered   No
Index Index 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.

Function Effect Condition
IF-Condition The steps following this function will be only executed if the given condition is true. Yes
ELSE-Condition The steps following this function will be only executed if the condition from the previous IF/ELSIF-Condition is false. No
ELSIF-Condition The 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-Condition The 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.

Function Effect Condition
Loop with condition The steps following this function will be executed in a loop as long as the given condition is true. Yes
Loop without condition The steps following this function will be executed in a loop until the loop is exited. No
End of Loop with condition The 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 condition The 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
EXIT The 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.