- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 03:35 PM
I wrote a recurring email - notification. I need a count of the notification in the email body..
To be precise I wrote an email notification that occurs continuously untill a specific condition is met. So, now what i need is to get the number in the email body.. i.e., if the email got triggered for the first time it needs to say 1st notification, and if its for the second time we need to say 2nd notification, so on.,
I hope I am clear, and I will get the answer for this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2017 12:35 PM
I achieved this by using the email scripts.. and using that email script reference in the notification..
here is the script...
(function runMailScript(current, template, email, email_action, event) {
// Add your code here
var count = event.parm2.toString();
if(count>0){
template.print("This is "+count+" reminder.");
}
})(current, template, email, email_action, event);
and I called this script in the 'what it will contain' in the notification,
This helped me to achieve the requirment ,,
just in case if anyone have the same requirement.. Hope this will help them..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 03:45 PM
Where are you triggering the notification from? Is it a scheduled job? Is there an option to pass in the counter as a parameter in the event you're triggering the notification with?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 03:51 PM
Hello David,
I am triggering the notification from Event, I am not familiar with how to pass counter as a parameter. Any help is much appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 03:55 PM
What is triggering the event to run? That is where you would pass it in. gs.eventQueue('<event_name>',<record>,<parameter1 -- i.e. counter>,<parameter2>);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 04:03 PM
A condition I worte is triggering the event to run,
for example when creating an incident, if the catageory is software it will trigger an event that sends notification, and also event should trigger untill the incident catageory changes from 'software'.(might be to any other)
I hope I am clear,
Any help will be much appreciated.