- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 11:04 AM
Hello all,
In my workflow, i have a scratchpad variable, but that variable is not displaying on the email notification within the workflow, it just comes across blank, any idea what i am doing wrong?
Setting scratchpad variables
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request', current.request);
ritm.addQuery('cat_item', 'd0a1facddbe0d094dcd69f67f496194c');
ritm.query();
while (ritm.next()) {
current.due_date = ritm.due_date;
ritm.update();
workflow.scratchpad.name = ritm.variables.firstname + ' ' + ritm.variables.lastname;
workflow.scratchpad.manager = ritm.variables.hiring_manager.getDisplayValue();
}
Email notification
AD account has been created for ${workflow.scratchpad.name}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 12:10 PM
The Message field interprets all its contents as string, whereas we want the get the dynamic value in the scratchpad.
The best way to do this is to use an Create Event activity and pass the recipient and the workflow scratchpad value as parameters 1 and 2. You will also require an Event Registry and a Notification record that triggers when this event is fired.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 11:19 AM
Hello Orlando, could you share a screenshot of your notification activity?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 11:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022 12:10 PM
The Message field interprets all its contents as string, whereas we want the get the dynamic value in the scratchpad.
The best way to do this is to use an Create Event activity and pass the recipient and the workflow scratchpad value as parameters 1 and 2. You will also require an Event Registry and a Notification record that triggers when this event is fired.