You can use the LoadIfEmpty
named function for expressions in Condition nodes of workflows to evaluate specific values from the system when there isn’t a corresponding drop-down list in the workflow form.
The LoadIfEmpty
named function includes the following parameters:
wfListName
: Defines which type of value to look for. For example,<<List_UserRoleList.Item.RoleId>>
to look for roles.loadingMode
: Controls which records of a value are evaluated. The available values for theloadingMode
parameter are as follows:"Primary"
: Evaluates the user’s primary value (for example, a user’s primary role)."Current"
: Evaluates values that have current effective dates."Latest"
: Evaluates the value that doesn't have an effective end date."CurrentAndFuture"
: Evaluates values that have current and future effective dates.
Note: If the loadingMode
parameter isn’t entered, or an incorrect mode option is used, the "AllKeyValues"
option is used by default. This option evaluates all options specified by the wfListName
parameter.
For example, a user submits a form that doesn't contain the Role drop-down list, but you want the Condition node to route users with Manager roles to a specific path in the workflow. The user in this case has a primary role of Manager and a secondary role of Employee, which was added to Dayforce more recently.
If you use the expression <<List_UserRoleList.Item.RoleId>> contains Role A
, the Condition node evaluates only the more recently added Employee role and the user isn’t routed to the correct path in the workflow.
For Dayforce to check all of the user’s current and future roles, you would use the following expression:
LoadIfEmpty("<<List_UserRoleList.Item.RoleId>>","CurrentAndFuture") Contains Manager
If the form contains a drop-down list for the value being evaluated in the expression, the expression always evaluates that value, regardless of the option used for the loadingMode
parameter. Continuing the earlier example, if a user selects the Employee role in the Role drop-down list of a form, the above expression evaluates only the Employee role.