- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2015 02:42 AM
Hello,
I'm new in SNow and I want to send email notification with some records from table. I have created a business rule, event and email notification, emails are sending properly. Now I want to add some information from a table but I'm confused how can I directly access "Select Variables" beside Message HTML.
I also search but they suggest about email script
I have two table
- Projects
- Records(have a reference field of Project Table)
In my business rule:
gs.eventQueue('event_name',current,current.sys_id,project.project_manager);
In my email notification:
I have selected table "Projects"
Select variables are not working in mail as they shows columns of "Project" table
I want to use like this
Project Name: ${name}
Manager: ${manager}
but it shows blank in mails
What I suppose to do now?
How can I use Select variables directly, please suggest me on this.
Thanks-
Macaius
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2015 05:58 AM
From which table do you trigger the email? From "Records" table? If so, this should probably work:
Project Name: ${project.name}
Manager: ${project.manager}
(assuming the reference field pointing to the Project table is called "project")
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2015 05:58 AM
From which table do you trigger the email? From "Records" table? If so, this should probably work:
Project Name: ${project.name}
Manager: ${project.manager}
(assuming the reference field pointing to the Project table is called "project")
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2015 10:07 PM
Thank you very much Slava,
Now I understand the concept clearly. That's was I'm looking for.
In my records table I have a reference field(project_name) and I use this in HTML message field like this
Project Name: ${project_name.name}
Manager: ${project_name.manager}
and this is working properly.
Thanks-
Macarius Anna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2015 06:40 AM
In our instance, we've added a separate email notification script that adds variables as required.
In the script, we use:
if (current.sysapproval.variable_pool.[variable name]) {
template.print('Variable description:' + current.sysapproval.variable_pool.[variable name]);
}
We then just call the email notification script from your email. I'd suspect you could use something very similar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2015 09:29 PM
Hello Phil,
Yes I already did this by email script but I wanted to do this in HTML Message field. BTW thanks for your reply.
Thanks-
Macarius Anna