<?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 Re: Email script - show label variable in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177090#M834016</link>
    <description>&lt;P&gt;I added a log to my script to see what was found in the variable pool and found that the label variables aren't captured in the variable pool. I'm working with my team to adjust how we label the checkboxes so the email is clearer.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 12 Jan 2017 22:45:08 GMT</pubDate>
    <dc:creator>kristenankeny</dc:creator>
    <dc:date>2017-01-12T22:45:08Z</dc:date>
    <item>
      <title>Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177084#M834010</link>
      <description>&lt;P&gt;We have email scripts to print the variables from requested items. Below is one example. I was asked to update it to include checkboxes from the form and I have that working, but the label variables above the checkboxes are not showing in the emails. Does anyone know how I would adjust this to show those?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(function runMailScript(current, template, email, email_action, event) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;nbsp; for (var key in current.variables) {&lt;/P&gt;&lt;P&gt; &amp;nbsp; var v = current.variables[key];&lt;/P&gt;&lt;P&gt; &amp;nbsp; if ( v.getGlideObject().getQuestion().getDisplayValue()!='' &amp;amp;&amp;amp; v.getGlideObject().getQuestion().getDisplayValue()!='false' &amp;amp;&amp;amp; v.getGlideObject().getQuestion().getLabel() != 'Workflow' &amp;amp;&amp;amp; v.getGlideObject().getQuestion().getLabel() != 'Requested for' &amp;amp;&amp;amp; v.getGlideObject().getQuestion().getLabel() != 'Phone number') {&lt;/P&gt;&lt;P&gt; &amp;nbsp; template.space(4);&lt;/P&gt;&lt;P&gt; &amp;nbsp; var dv = v.getGlideObject().getQuestion().getDisplayValue();&lt;/P&gt;&lt;P&gt; &amp;nbsp; if (dv.indexOf(',') &amp;gt; -1 &amp;amp;&amp;amp; v.getGlideObject().getQuestion().getType() != 2){&lt;/P&gt;&lt;P&gt; &amp;nbsp; template.print(' ' + v.getGlideObject().getQuestion().getLabel() + ': ' + "&amp;lt;/br&amp;gt;");&lt;/P&gt;&lt;P&gt; &amp;nbsp; var array = dv.split(',');&lt;/P&gt;&lt;P&gt; &amp;nbsp; for(var a = 0; a &amp;lt; array.length; a++){&lt;/P&gt;&lt;P&gt; &amp;nbsp; template.space(8);&lt;/P&gt;&lt;P&gt; &amp;nbsp; template.print(array[a] + "&amp;lt;/br&amp;gt;");&lt;/P&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;P&gt; &amp;nbsp; else{&lt;/P&gt;&lt;P&gt; &amp;nbsp; template.print(' ' + v.getGlideObject().getQuestion().getLabel() + " = " + v.getGlideObject().getQuestion().getDisplayValue() + "&amp;lt;br/&amp;gt;");&lt;/P&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;P&gt; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;})(current, template, email, email_action, event);&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 21:34:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177084#M834010</guid>
      <dc:creator>kristenankeny</dc:creator>
      <dc:date>2017-01-06T21:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177085#M834011</link>
      <description>&lt;P&gt;Lable must be a different variable, have you included in the mail script? &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Jan 2017 23:06:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177085#M834011</guid>
      <dc:creator>Deepa Srivastav</dc:creator>
      <dc:date>2017-01-06T23:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177086#M834012</link>
      <description>&lt;P&gt;Hi Deepa - It is another variable, though I can't see anything in my script that would exclude it from the variable pool. Are label variables not captured in the pool?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:50:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177086#M834012</guid>
      <dc:creator>kristenankeny</dc:creator>
      <dc:date>2017-01-09T13:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177087#M834013</link>
      <description>&lt;P&gt;Bump, in case someone can identify the issue in the script.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:36:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177087#M834013</guid>
      <dc:creator>kristenankeny</dc:creator>
      <dc:date>2017-01-12T18:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177088#M834014</link>
      <description>&lt;P&gt;ya it shouldn't be excluded, it must be coming separately and not with check box values...can you provide screenshot to confirm my understandng that you are referring label of checkbox variable.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jan 2017 18:52:15 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177088#M834014</guid>
      <dc:creator>Deepa Srivastav</dc:creator>
      <dc:date>2017-01-12T18:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177089#M834015</link>
      <description>&lt;P&gt;The checkbox variables' labels are showing in the resulting script, what I'm missing are the label variables, which act as headers for the checkboxes. For example, we have a label for "Toner" and checkboxes under that for each color available, then we have a label for "Imaging" and checkboxes for each color under that. My script pulls in the checkboxes that are "true" and shows their label (so the color), but the label variables "Toner" and "Imaging" are not showing.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jan 2017 20:13:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177089#M834015</guid>
      <dc:creator>kristenankeny</dc:creator>
      <dc:date>2017-01-12T20:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177090#M834016</link>
      <description>&lt;P&gt;I added a log to my script to see what was found in the variable pool and found that the label variables aren't captured in the variable pool. I'm working with my team to adjust how we label the checkboxes so the email is clearer.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jan 2017 22:45:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2177090#M834016</guid>
      <dc:creator>kristenankeny</dc:creator>
      <dc:date>2017-01-12T22:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2441542#M951096</link>
      <description>&lt;P&gt;Did someone find any solution to this ? I am facing a similar issue&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 13:08:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2441542#M951096</guid>
      <dc:creator>Garima13</dc:creator>
      <dc:date>2023-01-12T13:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2483680#M968657</link>
      <description>&lt;P&gt;Even I am facing the same issue, is this a known issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 18:15:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2483680#M968657</guid>
      <dc:creator>Kalpana7</dc:creator>
      <dc:date>2023-02-20T18:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2490163#M971103</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;Any solution or workaround for this issue, for we are facing the same issue and it is much required for the label to be displayed in the notification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kalpana&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 13:16:43 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2490163#M971103</guid>
      <dc:creator>Kalpana7</dc:creator>
      <dc:date>2023-02-27T13:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Email script - show label variable</title>
      <link>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2523832#M983146</link>
      <description>&lt;P&gt;Any suggestion please advise.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 10:25:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/email-script-show-label-variable/m-p/2523832#M983146</guid>
      <dc:creator>Kalpana7</dc:creator>
      <dc:date>2023-04-03T10:25:24Z</dc:date>
    </item>
  </channel>
</rss>

