You can configure messages in workflow nodes to populate the job assignment and location that users select in forms. By default, the tokens for job assignment and location only populate an ID number. However, you can add a look-up function to retrieve job assignment and location names associated with these tokens.
To configure this functionality:
- Go to Workflow Administration > Workflow Designer and click the Diagram tab.
- Select a Notification, Description, or End node in a workflow diagram.
- Click Create Expression in the Message Subject or Message Body property.
- Go to one of the following items in the sidebar and expand the Lookup function:
- List_EmployeeWorkAssignment > Item > DeptJobId (the token for job assignments).
- List_EmployeeWorkAssignment > Item > OrgUnitId (the token for locations).
- Click the FullName token to insert a statement that looks up the name of the job assignment or location:
-
For example, an expression in the Message Body property of a Notification node includes a look-up statement for location:
The <<WorkflowState.FormName>> form has been approved.
Submitter: <<WorkflowState.SubmitterDisplayName>>
Affected Employee: <<WorkflowState.TargetEmployeeDisplayName>>
Location: Lookup(<<List_EmployeeWorkAssignment.Item.OrgUnitId>>,"FullName")
Based on this expression, the following notification is generated:
Configuration Notes
- The look-up function can only be used with the
<<List_EmployeeWorkAssignment.Item.OrgUnitId>>and<<List_EmployeeWorkAssignment.Item.DeptJobId>>tokens, and can populate only theFullNametoken. - The look-up function is supported only in Notification, Decision, and End nodes, and not in Condition nodes.
- If users don’t modify the job assignment or location setting in a form, the look-up function populates the associated value in notifications based on the employee’s work assignment in People with the most recent effective start date. This is existing functionality for the
<<List_EmployeeWorkAssignment.Item.OrgUnitId>>and<<List_EmployeeWorkAssignment.Item.DeptJobId>>tokens. - For example, an employee has a primary role of Manager and a secondary role of Employee, which has a more recent effective start date. An administrator submits the Job Assignment and Compensation Change form for this employee to update their compensation but doesn’t change their job assignment or location. As a result, the secondary job assignment and location would be populated in the notification.