- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 08:43 AM
I am trying to update the email notification "Email assigned to group (sc_task).
All fields are populated except for the "employee_name" which I'm trying to pull from the variables on the SCTASK itself.
This is what the body looks like:
${mail_script:sctask_subject_line}
Number: ${number}
Short description: ${sc_task.short_description}
Request Requested for: ${request.requested_for}
Employee Name: ${sc_task.variables.employee_name}
Assignment group: ${assignment_group}
Also, my subject line script isn't pulling any values at all.
This what the subject line looks like right now: Task undefined - undefined for undefined
This what I have for the script:
email.setSubject('Task '+current.sc_task.number.getDisplayValue()+' - '+ current.sc_task_short_description.getDisplayValue()+' for '+current.sc_task.variables.employee_name.getDisplayValue());
WHAT AM I DOING WRONG?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 08:50 AM
HI,
Employee Name: ${sc_task.variables.employee_name}
variable is on RITM table. So try using this Employee Name: ${sc_task.request_item.variables.employee_name}
Thakns,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 10:12 AM
Thanks Ashutosh and Jaspal.
This is working just the way I want now.
I have a follow-on question though:
I have two different Catalog Items:
Say "Item1" and "Item2".
I want to trigger different sc_task notifications for each one of these.
Right now the Event trigger for all sc tasks is: "notification_engine.process".
If I create a new event, I can't seem to figure out how to trigger it on a per-item basis.
Joe

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 10:34 AM
Great to know it works.
For our per-item basis you can do below
1. You can create duplicate of existing notificaion that uses event.
2. Make it work on insert/update when Item is Item 1 && Item is not Item 2 from the filter instead of event.
3. Another one that runs on insert/update when Item is not Item 1 && Item is Item 2 from filter instead of event.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 11:15 AM