Scratchpad variable not displaying in email notification

lando321
Tera Contributor

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}
1 ACCEPTED SOLUTION

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. 

View solution in original post

3 REPLIES 3

AnirudhKumar
Mega Sage
Mega Sage

Hello Orlando, could you share a screenshot of your notification activity?

Sure thing

find_real_file.png

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.