Operator Types and Values

Dayforce Implementation Guide

Version
R2025.1.1
Operator Types and Values

This section provides guidance on the operator types used to evaluate logical expressions in Dayforce.

Logical expressions are evaluated by Condition nodes in Workflow Administration > Workflow Designer, which rely on these operators to evaluate the relationship between database fields and their values to determine if the condition is true or false.  

Operator Types and Values

Operator type values
Operator Type Values
Logical AND, OR, NOT
Comparison Equals, LessThan, GreaterThan, LessThanEquals, GreaterThanEquals
Arithmetic +, -, *, /
Functional today(), coalesce(), maxdate(), maxvalue(), current(), HasAuthorityType(),
HasRole(), employeerate(), paygraderate(), minimumwage(), getpaytypegroup(), max(name), min(name), IdFromXref()

Named Functions

The table below describes the named functions that can be used in Condition nodes.

Note: The sessionId parameter represents the ID of the existing session. Its type is string, and it’s retrieved by using the sessionId reserved word, as shown in some of the examples below.

Function summary
Function Summary
Coalesce Checks if collection provided as parameter has all not null elements and returns this collection or null. Any number of parameters are accepted. Strings treated as collections of characters.
ConvertToDate

Converts a date in string format to DateTime format.

The function accepts three parameters: year, month, and date. The time is always set to midnight. For example, December 16th, 1956 is entered as ConvertToDate(1956, 12, 16) and is converted to 1956-12-16 00:00:00.

Count  
createdbenefitenrollment Returns a Boolean value indicating if the workflow referenced within WorkflowDataId has created any benefits enrolments.
Current

Returns the current record of a supplied collection.

For example: Current(List_EmployeeWorkAssignment) would return a work assignment that has an effective start before or equal to today and no effective end or an effective end in the future.

Date If possible, converts the date provided as string in dateString to DateTime, otherwise returns null.
employeerate Returns a decimal representing the EmployeePayRate. If the supplied EmployeeEmploymentStatusID is <=0, it returns the WorkingRateSalary. Otherwise, if the PayType specified is “Hourly” it returns the BaseRate, else it returns BaseSalary.
getEmployeeProperty

Used to evaluate an employee property.

Syntax Example

GetEmployeePropertyValue("Employee Property XRefCode")OPERATOR"VALUE"

Note that the XRefCode must be enclosed in double quotation marks. You can find an XRefCode for an employee property in the Reference Code field in HR Admin > Employee Properties. You can use this function with employee properties that have the pick list, Boolean, date, string, and number data types. The following list contains an example for each of these data types:

  • Pick List: GetEmployeePropertyValue("EmployeePropertyXRefcode17") EQUALS "CHEQUE1"
  • Boolean: GetEmployeePropertyValue("EmployeePropertyXRefcode17") EQUALS True / False
  • Date: GetEmployeePropertyValue("EmployeePropertyXRefcode17") EQUALS today()
  • String: GetEmployeePropertyValue("EmployeePropertyXRefcode17") EQUALS "SIZE 30"
  • Number: GetEmployeePropertyValue("EmployeePropertyXRefcode17") GREATERTHAN 1

The function returns a single employee property value, so you can use it with properties that are configured to accept only one value. If the employee property is configured with Many at a time selected in the Assignable field, you can’t use it in this function.

getpaytypegroup Returns the PayTypeGroupCode for the supplied PayTypeID
HasAuthorityType Returns a Boolean value indicating if affectedId has authority of type authorityTypeXRefCode for supplied checkAuthorityForEmployeeId.
hascurrentprimaryjobchanged

Returns a Boolean value indicating if the current primary job for the EmployeeId has changed by cross referencing the database primary job with the list of submitted EmployeeWorkAssignments.

Syntax Example

HasCurrentPrimaryJobChanged(SessionId, List_EmployeeWorkAssignment.EmployeeId,
List_EmployeeWorkAssignment)

hascurrentprimaryworklocationchanged Returns a Boolean value indicating if the current primary work location has changed by checking the database for the primary work location of EmployeeId and cross referencing with the list of submitted EmployeeWorkAssignments.
hasfuturerecord Returns a Boolean value indicating if the property supplied has a record dated in the future when compared to the GlobalEffectiveStart parameter.
HasPositionPropertyChanged

Returns a Boolean value indicating if a certain position management entity has changed.

Syntax Example

HasPositionPropertyChanged("ChangesetPosition", "Name")

Enter the appropriate values for the PMEntityName and PropertyName:

HasPositionPropertyChanged(<<PMEntityName>>,<<PropertyName>>)

The following is a list of the available PMEntityNames and PropertyNames:

  • ChangesetPosition
    • Name
    • FullTimeEquivalent
    • ReferenceCode
    • LedgerCode
    • PositionNumber
    • GlobalId
    • PositionDescription
  • ChangesetPositionParentAssignment
    • ParentPositionName
    • ParentGlobalId
    • ChildGlobalId
    • GlobalId
    • EffectiveStart
    • EffectiveEnd
  • ChangesetPositionDetail
    • GlobalId
    • PositionGlobalId
    • BusinessUnitGlobalId
    • JobAssignmentGlobalId
    • BusinessUnitName
    • EffectiveStart
    • EffectiveEnd
  • ChangesetPositionLocation
    • GlobalId
    • PositionGlobalId
    • OrgUnitGlobalId
    • EffectiveStart
    • EffectiveEnd
  • ChangesetPositionStatus
    • GlobalId
    • PositionGlobalId
    • Status
    • EffectiveStart
    • EffectiveEnd
HasRole

Returns a Boolean value indicating if the employee has the supplied role cross-reference code.

Syntax Example

HasRole(SessionId, EmployeeId, RoleXRefCode)

Insert the appropriate values for the EmployeeId and RoleXRefCode. For example: 

HasRole(sessionId, <<EmployeeId>>, "CADMIN")

IdFromXref

Returns an integer value indicating if a record associated with the cross-reference code that you enter is applicable for an employee.

You can specify two arguments in the expression:

  • CollectionName: The name of the table to lookup the ID by reference code. For this argument, you must add a value called a store name in double quotes. See Store Names.
  • XrefCode: The reference code defined in Dayforce for the value that you’re evaluating. It must be added in double quotes.

Syntax Example

For a syntax example for this function, see Function Syntax Example: IdFromXref.

isemployeebenefitseligible Returns a Boolean value indicating if the supplied
EmployeeID is eligible for one or more benefits.
loadIfEmpty

Used to evaluate specific values from the system when there isn’t a corresponding drop-down list in the workflow form. See LoadIfEmpty Named Function.

MaxDate Returns the greatest DateTime value: 23:59:59.9999999 UTC, December 31, 9999.
maxvalue

Returns the greatest of the two supplied comparable parameter objects.

For example: maxvalue(15.4, 21.2) returns 21.2

minimumwage Returns a decimal indicating minimum wage for the supplied OrgUnitID as of the date specified in AsOfDate.
paygraderate

Returns the pay grade rate for the supplied combination of parameters. In the parameters, you can specify which rate of the pay grade to return (min, max, mid, or control).

Syntax Example

In this example, a workflow that is used to process the New Hire form has a Condition node that evaluates whether the new hire’s rate is above the mid level of the pay grade associated with the job.

In the expression of the Condition node, the code of the paygraderate() function (highlighted yellow) includes parameters to return the mid pay rate of the employee’s job:

employeerate(

sessionId,

<<List_EmployeeEmploymentStatus.Item.EmployeeEmploymentStatusId>>,

<<List_EmployeeEmploymentStatus.Item.PayTypeId>>, <<List_EmployeeEmploymentStatus.Item.BaseRate>>, <<List_EmployeeEmploymentStatus.Item.BaseSalary>>,

<<List_EmployeeEmploymentStatus.Item.WorkingRateSalary>>)

greaterthan

paygraderate(

sessionId,

<<List_EmployeeWorkAssignment[currentprimary].Item.OrgUnitId>>,

<<List_EmployeeEmploymentStatus.Item.PayTypeId>>,

<<List_EmployeeEmploymentStatus.Item.PayClassId>>,

<<List_EmployeeWorkAssignment[currentprimary].Item.DeptJobId>>,

<<GlobalEffectiveStart>>,

"MID")

Today Returns current (at the time of invocation) date and time on the server. This could be different from the current date and time on the user instance.

Function Syntax Example: IdFromXref

A workflow has a Condition node that evaluates whether an employee belongs to a specific union.

In the expression of the Condition node, the code of the IdFromXref() function (highlighted yellow, below) gets the ID for the union with reference code “Local 306” from the store name “Unions” to compare against the ID corresponding to employee’s current union:

<<List_EmployeeUnion.Item.DFUnionId>> EQUALS <<IdFromXref("Unions","Local 306")>>

Expression of the condition node.

If they match, the workflow continues from the Condition node to the True connector:

Workflow continuing from the condition node to the true connector.

If they don’t match, it continues to the False connector:

Workflow continuing from the condition node to the false connector.