- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 07:22 AM
Hello,
How would I pull a field through from one table into a notification template or email based on another table?
I'm trying to pull through the details of a Change Request (change_request table) and put them in an approval email template (sysapproval_approver table), and I'm not sure what the syntax would be to do this, I've tried various variations on ${table name.field name} but nothing seems to be working.
Any ideas?
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 06:25 AM
Hi David,
Here you go, use the below. I've verified it works
var gr = new GlideRecord("change_request");
gr.get(current.document_id);
template.print("Start Date:" + gr.start_date + '<BR>');
template.print("End Date:" + gr.end_date);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2017 05:26 AM
Thank you again for your help Pritam, I've pulled through all the relevant information and the templates are looking good now.
Kind regards
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2017 10:03 AM
Hi David,
Glad to hear it all works as intended
Feel free to mark the thread as answered.
Thanks,
Pritam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2023 09:14 PM
Thanks for sharing Pritman, the code works well.
Using this example the start/end time are in GMT. How can these be modified to EST?
Also, I'm include the Risk field which returns an integer. Is there a way to return the field label instead? Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-28-2024 12:06 AM
I used the same logic to pull a variable from a table "kb_knowledge" to a notification created based on table: 'kb_feedback_task'
I used the following
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2017 07:42 AM
Hi David,
If the notification is on the sysapproval table then simply using ${sysapproval.field_name} you can print the field name.