- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:25 AM
I am Calling an event in a runscript activity in aWOrkflow as follows:
gs.eventQueue('upoint_approval_notification',current,newstartTime,newendTime);
i was able to pass the parameters to the event and i want to pass these parameter to the Email notification
this is how i have written the notificaiton.:
Body:
A planned blackout for the ${current.variables.upb_client_id}, ${current.variables.upb_client_name} UPoint Production site will be in place from ${newstartTime} to ${newendTime}.
Please ignore any TMART monitors during that timeframe.
My issue is,
i wan to pass the parameter which i am geeting from the event to the email notification and send them to a group email. i have written like the above and the parameters are not getting displayed in the Email notification when i check the logs.
Can some one please help me with this,
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:46 AM
Ursnani,
You should use a notification email script to pass the information from the event to the notification.
Covering our bases:
- Generate an event and pass the params of your choice.
- Create a notification email script to print the param of your choice
- Have a notification trigger off that very same event and call the notification email script in the body.
Example:
Let's say I have a business rule that triggers on incident state change and I pass the previous value in parm1 of the event.
I then have to create a notificaiton email script called "incident_previous_state" with the following:
(function runMailScript(current, template, email, email_action, event) {
template.print(event.parm1);
})(current, template, email, email_action, event);
Finally I add it into where I want the information to appear in the notification body using the following:
Previous State: ${mail_script:incident_previous_state}
Note: When using notification email scripts, you cannot place it into the subject like the normal field variables. There is a function you can use in notification email scripts to interact with the subject line.
Scripting for email notifications
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:40 AM
Hi Ursnani,
I guess you will have to write a mail scirpt for accessing or having variables sent out via notifications.
Link Adding cat item variables to email notification would help you understand better.
Also, if newendtime & newstarttime are fields on form then try using ${current.newendTime} & ${current.newstartTime}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:48 AM
There is a lot that happening in our instances.
the Tiime in the Date Time filed which are present on RITM are being converted to UTC. So i have written a code that converts the time from utc to user timezone. and the newendtime and newstartime are not the fields on the form. i getting the values from the form and converting the values and passing them through newendtime and newstartime by an event. In the EVENT LOGS i can see the converted time but the time are not going to Email notificatiions when i used them.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2017 07:46 AM
Ursnani,
You should use a notification email script to pass the information from the event to the notification.
Covering our bases:
- Generate an event and pass the params of your choice.
- Create a notification email script to print the param of your choice
- Have a notification trigger off that very same event and call the notification email script in the body.
Example:
Let's say I have a business rule that triggers on incident state change and I pass the previous value in parm1 of the event.
I then have to create a notificaiton email script called "incident_previous_state" with the following:
(function runMailScript(current, template, email, email_action, event) {
template.print(event.parm1);
})(current, template, email, email_action, event);
Finally I add it into where I want the information to appear in the notification body using the following:
Previous State: ${mail_script:incident_previous_state}
Note: When using notification email scripts, you cannot place it into the subject like the normal field variables. There is a function you can use in notification email scripts to interact with the subject line.
Scripting for email notifications
Hope this helps!