<?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 Hide Empty Variables on Approval Record in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688041#M344967</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to display the variable editor from the requested item and display it on the approval record and additionally hide the empty variables. &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to display the variables on the approval record by modifying the "approval_summarizer_sc_req_item" Macro with the xml from "approval_summarizer_default". &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;My only issue now is that I want to hide the empty variables on the approval record. I'm able to hide this on the requested item using an on display business rule and client client script (&lt;A title="k-external-small" class="jive-link-external-small" href="http://www.servicenowguru.com/scripting/business-rules-scripting/hide-empty-variables-standard-form/" rel="nofollow" target="_blank"&gt;http://www.servicenowguru.com/scripting/business-rules-scripting/hide-empty-variables-standard-form/&lt;/A&gt;), however this method will not work on the approval record as the variables are being rendered from the Macro. &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Would appreciate if anyone knew how to modify the UI Macro to achieve this result.&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2014 06:33:47 GMT</pubDate>
    <dc:creator>masella</dc:creator>
    <dc:date>2014-07-21T06:33:47Z</dc:date>
    <item>
      <title>Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688041#M344967</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to display the variable editor from the requested item and display it on the approval record and additionally hide the empty variables. &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to display the variables on the approval record by modifying the "approval_summarizer_sc_req_item" Macro with the xml from "approval_summarizer_default". &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;My only issue now is that I want to hide the empty variables on the approval record. I'm able to hide this on the requested item using an on display business rule and client client script (&lt;A title="k-external-small" class="jive-link-external-small" href="http://www.servicenowguru.com/scripting/business-rules-scripting/hide-empty-variables-standard-form/" rel="nofollow" target="_blank"&gt;http://www.servicenowguru.com/scripting/business-rules-scripting/hide-empty-variables-standard-form/&lt;/A&gt;), however this method will not work on the approval record as the variables are being rendered from the Macro. &lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Would appreciate if anyone knew how to modify the UI Macro to achieve this result.&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P style="min-height: 8pt; height: 8pt; padding: 0px;"&gt; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2014 06:33:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688041#M344967</guid>
      <dc:creator>masella</dc:creator>
      <dc:date>2014-07-21T06:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688042#M344968</link>
      <description>&lt;P&gt;Hi Anthony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;You could hide the variables by putting a &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;if/else block inside your macro itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;You need to initialize variables before creating HTML table structure, that way you know which variables are empty and need not be shown inside table and you can exclude whole column &amp;nbsp; itself.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;j:set var="jvar_my_variable" value="${some_value}"/&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;now before creating a header cell, you could have a simple check like below&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;tr class="header"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;j:if test="${jvar_my_variable != ''}"&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;td&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; Header For My Variable&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;/j:if&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Also, you could add below line while populating table data.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;j:if test="${jvar_my_variable != ''}"&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;td&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; ${jvar_my_variable}&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;/j:if&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Mandar&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Jul 2014 06:55:20 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688042#M344968</guid>
      <dc:creator>ohhgr</dc:creator>
      <dc:date>2014-07-21T06:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688043#M344969</link>
      <description>&lt;P&gt;Hi Mandar,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Appreciate your assistance. On some of my catalog items I have over 400 variables so I would need to loop through the variables to determine if they were empty. I wouldn't be able to to define them as suggested in your example. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Jul 2014 23:16:42 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688043#M344969</guid>
      <dc:creator>masella</dc:creator>
      <dc:date>2014-07-21T23:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688044#M344970</link>
      <description>&lt;P&gt;Hi Anthony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;How do you display variables currently in the approval summarizer page? My earlier code was assuming that you display a separate variable in a separate column.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;If you could share the way you display the variables currently that'd help to suggest a better way.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Mandar&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jul 2014 05:16:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688044#M344970</guid>
      <dc:creator>ohhgr</dc:creator>
      <dc:date>2014-07-22T05:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688045#M344971</link>
      <description>&lt;P&gt;Hi Mandar,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks once more for your response. I pasted the below XML code from approval_summarizer_default into approval_summarizer_sc_req_item. The result is that it displays all the variables from the requested item variable editor onto the approval summarizer. It looks very good with the exception that the empty variables are also being displayed. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;j:jelly trim="true" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;g:evaluate var="jvar_has_source" &amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; var flag = !${ref}.sysapproval.nil() || !${ref}.source_table.nil();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; flag;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;/g:evaluate&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;j:if test="${jvar_has_source}"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;g:evaluate var="jvar_ni" expression=" &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var gr = null;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( !${ref}.source_table.nil()) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr = new GlideRecord(${ref}.source_table);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.get( ${ref}.document_id);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr = new GlideRecord('task');&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.get(${ref}.sysapproval);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; " /&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;g:evaluate&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_approval_form_request = true; // this global is checked in ACLs&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/g:evaluate&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;g:evaluate var="jvar_my_form"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var gc = &amp;nbsp; new GlideController();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var p = &amp;nbsp; new GlidePopup(gc, "${gr.sys_class_name}");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p.putParameter("sys_id", "${gr.sys_id}");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p.putParameter("sysparm_view", "approval");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //PRB579164: Skip g_form creation in activities.xml if activities displayed in formatter&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p.putParameter("sysparm_skip_gform", "true"); &lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var rp = p.getRenderProperties();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rp.setSmallCaption(true);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var s = p.getPopup();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/g:evaluate&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr id="approval_summary_row"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td width="100%" colspan="2"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;j2:if test="${gs.getProperty('glide.security.use_csrf_token')}" &amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="HIDDEN" name="sysparm_ck" value="$[gs.getSessionToken()]"/&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/j2:if&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div id="approval_summary" style="padding-top:8px;display:none;"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class="caption" style="padding:4px;"&amp;gt;${gs.getMessage('Summary of Item being approved')}&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div style="padding-left:2px;"&amp;gt;&amp;lt;g:no_escape&amp;gt;${jvar_my_form}&amp;lt;/g:no_escape&amp;gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/td&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;g:evaluate&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; delete g_approval_form_request; // removes the global&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/g:evaluate&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;script&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; addRenderEvent(moveSummaryForm);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function moveSummaryForm() {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var e = $("approval_summary");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var form = $("sysapproval_approver.do");&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var formParent = form.parentNode;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; formParent.appendChild(e);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.show();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; &amp;lt;/j:if&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;lt;/j:jelly&amp;gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jul 2014 05:23:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688045#M344971</guid>
      <dc:creator>masella</dc:creator>
      <dc:date>2014-07-22T05:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688046#M344972</link>
      <description>&lt;P&gt;Hi Anthony,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I rarely have worked on GlideController or GlidePopup objects, so i'm not completely aware of the ways to hide variables in them.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;May be someone who has would be able to guide you. Also, I'll let you know if i find anything related.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Mandar&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jul 2014 05:51:21 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688046#M344972</guid>
      <dc:creator>ohhgr</dc:creator>
      <dc:date>2014-07-22T05:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688047#M344973</link>
      <description>&lt;P&gt;Hi Anthony -&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Not sure if this would help you, but I've done something similar that is pretty straight forward. &amp;nbsp; If you follow through the approval summarizer macros, you should eventually get to approval_variable_summary. &amp;nbsp; This has a section of code that loops through all variables associated with the request and writes them out. &amp;nbsp; The default code looks like: &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt; &amp;lt;j:forEach var="jvar_question" items="${set.getFlatQuestions()}"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;lt;j:if test="${jvar_question.isVisibleSummary()}"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;g:summarize_question question="${jvar_question}" /&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/j:if&amp;gt;&lt;BR /&gt;&amp;lt;/j:forEach&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt;By adding a couple of tests inside the loop, you can reasonably filter out the empty variables as such: &lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt; &amp;lt;j:forEach var="jvar_question" items="${set.getFlatQuestions()}"&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt;&amp;lt;j:if test="${jvar_question.isVisibleSummary()}"&amp;gt;&lt;BR /&gt;&lt;EM style="font-family: inherit;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG style="font-family: inherit; font-style: inherit;"&gt; &amp;lt;j:if test="${jvar_question.getDisplayValue()!="}"&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;j:if test="${jvar_question.getDisplayValue() != '— None —'}"&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;g:summarize_question question="${jvar_question}" /&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;BR /&gt;&lt;EM style="font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/j:if&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-family: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/j:if&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&amp;lt;/j:if&amp;gt;&lt;BR /&gt;&amp;lt;/j:forEach&amp;gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt;This will cause all variables with an empty value or list variables that have a value of '-- None --' (default when option selected) to not be displayed.&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt;Also, if you have variables that should never be displayed on the summary, you can use the "Visible on Summaries" option on the variable definition itself. &amp;nbsp; By default, this option is both enabled and not displayed on the variable form. &amp;nbsp; By adding this to the variable form you can de-select this option and the variable will never display on the summary (regardless of whether it is empty or not).&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: italic; margin-top: 1em; margin-bottom: 1em; color: #666666; background-color: #fcfcfc;"&gt;I've got a little more of a write-up on my site here at &lt;A title="revealed.com/" href="http://snrevealed.com/"&gt;SN Revealed&lt;/A&gt;.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Nov 2014 17:40:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688047#M344973</guid>
      <dc:creator>trisalsa</dc:creator>
      <dc:date>2014-11-10T17:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688048#M344974</link>
      <description>&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I tried the above macro inside the approval_varriable_summary, but i am getting the below error,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;IMG alt="Error Message" class="jiveImage" src="https://ashleydev.service-now.com/images/outputmsg_error.gifx" style="margin: 0 4px 0 0;" /&gt;Error at line (15) Open quote is expected for attribute "test" associated with an element type "j:if".&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 17 Jan 2015 17:22:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688048#M344974</guid>
      <dc:creator>Mohamed Faizel</dc:creator>
      <dc:date>2015-01-17T17:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688049#M344975</link>
      <description>&lt;P&gt;Did you get this work?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:44:34 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/1688049#M344975</guid>
      <dc:creator>rachellesan</dc:creator>
      <dc:date>2015-06-02T15:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hide Empty Variables on Approval Record</title>
      <link>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/2789868#M1071770</link>
      <description>&lt;P&gt;I got this to work with two single quotes (!=''), which am guessing is what was originally posted but auto formatted to a single double quote:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;j:if test="${jvar_question.getDisplayValue()!=''}"&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;So, the full thing:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;j:forEach var="jvar_question" items="${set.getFlatQuestions()}"&amp;gt;
     &amp;lt;j:if test="${jvar_question.isVisibleSummary()}"&amp;gt;
          &amp;lt;j:if test="${jvar_question.getDisplayValue()!=''}"&amp;gt;
               &amp;lt;j:if test="${jvar_question.getDisplayValue() != '— None —'}"&amp;gt;
                    &amp;lt;g:summarize_question question="${jvar_question}" /&amp;gt;
                &amp;lt;/j:if&amp;gt;
          &amp;lt;/j:if&amp;gt;
     &amp;lt;/j:if&amp;gt;
&amp;lt;/j:forEach&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 21:42:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/hide-empty-variables-on-approval-record/m-p/2789868#M1071770</guid>
      <dc:creator>aen612</dc:creator>
      <dc:date>2024-01-11T21:42:33Z</dc:date>
    </item>
  </channel>
</rss>

