<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Pulling the fields through from another table into a Notification email body in Virtual Agent forum</title>
    <link>https://www.servicenow.com/community/virtual-agent-forum/pulling-the-fields-through-from-another-table-into-a/m-p/2998996#M9897</link>
    <description>&lt;P&gt;&lt;SPAN&gt;How would I pull a field through from one table into a notification template or email based on another table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm trying to pull through the details of a Affected Ci (task_ci table) fields as technology manager ; name and put them in an notification email template (change_request table).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and I'm not sure what the syntax would be to do this, I've tried various variations on&amp;nbsp;${table name.field name} but nothing seems to be working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2024 02:41:24 GMT</pubDate>
    <dc:creator>sureshpcse</dc:creator>
    <dc:date>2024-07-25T02:41:24Z</dc:date>
    <item>
      <title>Pulling the fields through from another table into a Notification email body</title>
      <link>https://www.servicenow.com/community/virtual-agent-forum/pulling-the-fields-through-from-another-table-into-a/m-p/2998996#M9897</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How would I pull a field through from one table into a notification template or email based on another table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm trying to pull through the details of a Affected Ci (task_ci table) fields as technology manager ; name and put them in an notification email template (change_request table).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and I'm not sure what the syntax would be to do this, I've tried various variations on&amp;nbsp;${table name.field name} but nothing seems to be working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 02:41:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-forum/pulling-the-fields-through-from-another-table-into-a/m-p/2998996#M9897</guid>
      <dc:creator>sureshpcse</dc:creator>
      <dc:date>2024-07-25T02:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling the fields through from another table into a Notification email body</title>
      <link>https://www.servicenow.com/community/virtual-agent-forum/pulling-the-fields-through-from-another-table-into-a/m-p/3000638#M9954</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/754828"&gt;@sureshpcse&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can refer below email script but need to modify the field according to the&amp;nbsp;&lt;SPAN&gt;technology manager. believing that you have created the notification on the change table so&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {
    var taskci = new GlideRecord("task_ci");
    taskci.addQuery("task", current.sys_id);
    taskci.query();
    while (taskci.next()) {
        var gr1 = new GlideRecord("cmdb_ci")
        gr1.addQuery("sys_id", taskci.ci_item);
        gr1.query();
        if (gr1.next()) {
            template.print("OWNED BY IS : " + gr1.getDisplayValue('owned_by')); // add your field name here
        }
    }



})(current, template, email, email_action, event);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BK&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 10:00:30 GMT</pubDate>
      <guid>https://www.servicenow.com/community/virtual-agent-forum/pulling-the-fields-through-from-another-table-into-a/m-p/3000638#M9954</guid>
      <dc:creator>Bhavya11</dc:creator>
      <dc:date>2024-07-26T10:00:30Z</dc:date>
    </item>
  </channel>
</rss>

