
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 06:47 AM
Hi all,
To try make life easier for the team, I'm trying to embed an Employee Name (variable) into the Short Description of a TASK. These TASKS are for joiners, movers and leavers and the existing Short Description requires the team to drill into the ticket. Seemingly will make life easier if they can see the emp name in the list view, especially when reviewing what has been actioned during a week or month.
I've added a Switch into my workflow, that based on the Item type (Joiner, Mover, Leaver) the Short Description will append the employee name variable
An example below is of Joiner, and it is working as expected. This was added as an advanced script
task.short_description = (current.short_description+ " - " +current.variables.emp_name) ;
Should note this variable is a single line text field.
When I try do this for mover or leaver, I'm getting the below result
task.short_description = (current.short_description+ " - " +current.variables.emp_name_mover) ;
Gut is telling me it's something to do with the variables on leaver and mover being reference fields, where as joiner is just a string?
Any help would be appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 07:08 AM
Hi,
For any field/ variable which is reference please use the below code:
current.variables.emp_name_mover.getDisplayValue();
getDisplayValue() will help in getting the display value of every reference field.
All reference field return "Sys_id" of the record.
Regards,
Shamma

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 06:49 AM
change below
current.variables.emp_name_mover.getDisplayValue();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 07:41 AM
Thanks Mike, worked perfectly

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 07:48 AM
My answer was same as other so not sure why his answer was mark correct ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 07:08 AM
Hi,
For any field/ variable which is reference please use the below code:
current.variables.emp_name_mover.getDisplayValue();
getDisplayValue() will help in getting the display value of every reference field.
All reference field return "Sys_id" of the record.
Regards,
Shamma