<script custom-tag="" type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"UI macros","image":"http://support.servicenow.com/29f1d2661baf6010cafa53d8624bcb43.iix","author":{"name":"ServiceNow Support","url":"http://support.servicenow.com/now"},"keywords":"ServiceNow, NowSupport public Knowledge Base articles, Product Documentation: Vancouver,KB1464209,","wordcount":"5054","publisher":"ServiceNow","url":"https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1464209","datePublished":"2025-01-05","dateCreated":"2023-08-02","dateModified":"2023-08-02","description":"<h2>UI macros</h2><br/><div style=\"overflow-x:auto\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"><head><meta content=\"text/html; charset=UTF-8\" /><meta name=\"copyright\" con","articleBody":"<h2>UI macros</h2><br/><div style=\"overflow-x:auto\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"><head><meta content=\"text/html; charset=UTF-8\" /><meta name=\"copyright\" content=\"(C) Copyright 2025\" /><meta name=\"DC.rights.owner\" content=\"(C) Copyright 2025\" /><meta name=\"generator\" content=\"DITA-OT\" /><meta name=\"DC.type\" content=\"concept\" /><meta name=\"DC.title\" content=\"UI macros\" /><meta name=\"abstract\" content=\"UI macros are discrete scripted components administrators can add to the user interface.\" /><meta name=\"description\" content=\"UI macros are discrete scripted components administrators can add to the user interface.\" /><meta name=\"DC.subject\" content=\"UI macros, user interface, Jelly, approval ui macro, custom\" /><meta name=\"keywords\" content=\"UI macros, user interface, Jelly, approval ui macro, custom\" /><meta name=\"DC.relation\" scheme=\"URI\" content=\"../../../script/general-scripting/concept/create-custom-ui-pages.html\" /><meta name=\"DC.relation\" scheme=\"URI\" content=\"../../../build/custom-application/concept/build-applications.html\" /><meta name=\"DC.relation\" scheme=\"URI\" content=\"../../../build/custom-application/concept/developing-applications.html\" /><meta name=\"DC.relation\" scheme=\"URI\" content=\"../../../build/custom-application/reference/building-pro-code-applications.html\" /><meta name=\"DC.relation\" scheme=\"URI\" content=\"../../../script/topic/c_Script.html\" /><meta name=\"DC.creator\" content=\"ServiceNow\" /><meta name=\"DC.date.created\" content=\"2023-08-03\" /><meta name=\"DC.date.modified\" content=\"2023-08-03\" /><meta name=\"DC.format\" content=\"XHTML\" /><meta name=\"DC.identifier\" content=\"c_UIMacros\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"../../../CSS/commonltr.css\" /><title>UI macros</title></head><body>\n<div class=\"nested0\" id=\"c_UIMacros\">\n <h1 class=\"title topictitle1\" id=\"ariaid-title1\">UI macros</h1>\n\n \n \n <div class=\"body conbody\"><p class=\"shortdesc\"><span class=\"ph\">UI macros are discrete scripted components administrators can add\n to the user interface.</span></p>\n\n <div class=\"p\">UI macros are typically controls that provide inputs or\n information not provided by existing field types. By default, the system provides UI macros\n for a variety of user interface elements such as:<ul class=\"ul\" id=\"c_UIMacros__ul_d4b_dwq_rv\"><li class=\"li\">All formatters</li><li class=\"li\">The Service Catalog cart</li><li class=\"li\">The action icons next to fields</li><li class=\"li\">The action icons on forms and lists</li><li class=\"li\">The widgets of a content management system</li><li class=\"li\">The Orchestration activity designer</li></ul>\n</div>\n\n <p class=\"p\">Administrators can create their own UI macros to provide custom controls or interfaces.\n Creating UI macros requires knowledge of <a class=\"xref\" href=\"http://commons.apache.org/proper/commons-jelly/\" target=\"_blank\" rel=\"noopener noreferrer\">Jelly\n script</a>. Review the existing UI macros for examples and suggested approaches. Those who\n want to build custom interfaces with JavaScript technologies should consider Service Portal as an\n alternative.</p>\n\n <div class=\"note\"><span class=\"notetitle\">Note:</span> To view available UI macros, navigate to <span class=\"ph uicontrol\">All</span> > <span class=\"ph uicontrol\">System UI</span> > <span class=\"ph uicontrol\">UI Macros</span>.</div>\n\n </div>\n\n \n<div class=\"related-links\">\n<div class=\"familylinks\">\n<div class=\"parentlink\"><strong>Parent Topic:</strong> <a class=\"link\" href=\"../../../script/general-scripting/concept/create-custom-ui-pages.html\" title=\"Use UI pages to create custom pages for an application and UI macros for custom controls or interfaces.\">Creating custom UI Pages and UI macros</a></div>\n</div>\n</div><div class=\"topic reference nested1\" id=\"ui-macro-basics\">\n <h2 class=\"title topictitle2\" id=\"ariaid-title2\">UI macro basics</h2>\n\n \n \n <div class=\"body refbody\"><p class=\"shortdesc\">Administrators can create UI macros to create custom user controls and interfaces. UI macros can be used to build solutions that can’t be built using the available catalog variable types.</p>\n\n <div class=\"section\" id=\"ui-macro-basics__section_z1m_kty_4zb\"><h3 class=\"title sectiontitle\">Accessible UI macros</h3>\n \n <p class=\"p\">Several UI macros are available in the UI macros [ui_macros] table. These UI macros have names starting with <code class=\"ph codeph\">ui_</code> and emulate the behavior of a subset of standard form field types for use in UI pages. For example,\n the ui_date_time UI macro can act like a glide_date_time field in a UI page, providing a type-able input field with a date/time selector.</p>\n\n <div class=\"p\">A UI macro can be included in a UI page with the <g:> Jelly tag. The following example includes the ui_date_time UI Macro, providing two optional attributes to the UI\n Macro:<pre class=\"pre codeblock\"><code><g:ui_date_time name="due_date" value="2023-11-24 08:30:00" onchange="checkDateValue()" /></code></pre></div>\n\n <div class=\"p\">The attribute values in the <g:> Jelly tag are provided to the UI macro as jvar-prefixed variables. The UI macro can use the jvar-prefixed variables in its XML.\n<div class=\"tablenoborder\"><table cellpadding=\"4\" cellspacing=\"0\" summary=\"\" id=\"ui-macro-basics__table_o5n_1nx_qzb\" class=\"table\" frame=\"border\" border=\"1\" rules=\"all\"><caption><span class=\"tablecap\"><span class=\"table--title-label\">Table 1. </span>Jelly tag attributes used as jvar-prefixed variables</span></caption><colgroup><col style=\"width:50%\" /><col style=\"width:50%\" /></colgroup><thead class=\"thead\" style=\"text-align:left;\"><tr class=\"row\"><th class=\"entry cellrowborder\" style=\"vertical-align:top;\" id=\"d173310e209\">Attributes</th><th class=\"entry cellrowborder\" style=\"vertical-align:top;\" id=\"d173310e212\">jvar-prefixed variables</th></tr></thead><tbody class=\"tbody\"><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e209 \">name</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e212 \">jvar_name</td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e209 \">value</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e212 \">jvar_value</td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e209 \">onchange</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e212 \">jvar_onchange</td></tr></tbody></table>\n</div>\n<div class=\"note\"><span class=\"notetitle\">Note:</span> These UI macros aren’t intended to support all features of their corresponding form field type. In many cases, the macros are only intended for specific <span class=\"ph\">ServiceNow</span> application use cases.\n <p class=\"p\">The <code class=\"ph codeph\">ui_</code>-prefixed UI macros include descriptions specifying supported attributes that can (or must) be provided in the UI page's <g:> Jelly tag. To view available UI macros, navigate to\n <span class=\"ph uicontrol\">All</span> > <span class=\"ph uicontrol\">System UI</span> > <span class=\"ph uicontrol\">UI macros</span>.</p>\n</div>\n</div>\n\n </div>\n\n <div class=\"section\" id=\"ui-macro-basics__section_chz_xhx_qzb\"><h3 class=\"title sectiontitle\">Custom UI macros</h3>\n \n <p class=\"p\">The ui_example UI macro uses three jvar-prefixed variables: jvar_name, jvar_test_attribute and jvar_laptop_type. These variables can be provided to the UI macro as name, test_attribute and laptop_type attributes in a <g:> Jelly\n tag in a UI page.</p>\n\n <dl class=\"dl\">\n \n <dt class=\"dt dlterm\">Creating the ui_example UI macro</dt>\n\n <dd class=\"dd\">Navigate to <span class=\"ph uicontrol\">All</span> > <span class=\"ph uicontrol\">System UI</span> > <span class=\"ph uicontrol\">UI Macros</span> and select <span class=\"ph uicontrol\">New</span>.<div class=\"p\">Name the macro ui_example and add the following\n script to the <span class=\"ph uicontrol\">XML</span> field:<pre class=\"pre codeblock\"><code><?xml version="1.0" encoding="utf-8" ?>\n<j:jelly trim="true" xmlns:j="jelly:core" xmlns:g="glide">\n <div>name jvar: ${jvar_name}</div>\n <div>test_attribute jvar: ${jvar_test_attribute}</div>\n <div>laptop_type jvar: ${jvar_laptop_type}</div>\n</j:jelly></code></pre></div>\n</dd>\n\n \n \n <dt class=\"dt dlterm\">Using the macro in a UI page</dt>\n\n <dd class=\"dd\">Navigate to <span class=\"ph uicontrol\">All</span> > <span class=\"ph uicontrol\">System UI</span> > <span class=\"ph uicontrol\">UI Pages</span> and select <span class=\"ph uicontrol\">New</span>. You will be asked to select an administrator role.<div class=\"p\">Name the UI page and add\n the following script to the <span class=\"ph uicontrol\">HTML</span> field:<pre class=\"pre codeblock\"><code><?xml version="1.0" encoding="utf-8" ?>\n<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">\n <div style="text-decoration:underline">Template include one:</div>\n <g:ui_example name="Fred Luddy" test_attribute="I am an attribute" laptop_type="ThinkPad" />\n <hr/>\n <div style="text-decoration:underline">Template include two:</div>\n <g:ui_example name="Pat Casey" test_attribute="I am a different attribute" laptop_type="Macbook Pro" />\n</j:jelly></code></pre></div>\n</dd>\n\n \n \n <dt class=\"dt dlterm\">Checking output</dt>\n\n <dd class=\"dd\">In the UI page, you can click <span class=\"ph uicontrol\">Try It</span> to view the results.<div class=\"fig fignone\" id=\"ui-macro-basics__fig_xrq_mqc_rzb\"><span class=\"figcap\"><span class=\"fig--title-label\">Figure 1. </span>UI page with output formatted by UI macro</span>\n \n <img class=\"image\" id=\"ui-macro-basics__image_urf_2qc_rzb\" alt=\"The example UI Page displaying content in the format of the ui_example macro.\" />\n </div>\n</dd>\n\n \n </dl>\n\n <div class=\"p\"><div class=\"note\"><span class=\"notetitle\">Note:</span> If you create a macro and it doesn’t display as expected in the UI page, clearing the cache might help. To clear the cache of your instance, in your browser, enter <server_url>/cache.do.</div>\n</div>\n\n </div>\n\n </div>\n\n <div class=\"related-links\">\n<div class=\"linklist relinfo relref\"><strong>Related reference</strong><br />\n<ul class=\"linklist\"><li class=\"linklist\"><a class=\"link\" href=\"../reference/r_UIPages.html\" title=\"UI pages can be used to create and display forms, dialogs, lists, and other UI components.\">UI pages</a></li><li class=\"linklist\"><a class=\"link\" href=\"../../general-scripting/reference/r_JellyTags.html\" title=\"Use Jelly to turn XML into HTML.\">Jelly tags</a></li><li class=\"linklist\"><a class=\"link\" href=\"../../general-scripting/concept/c_ExtensionsToJellySyntax.html#r_GUIForm\" title=\"This tag defines a form on the UI page.\"><g:ui_form/></a></li><li class=\"linklist\"><a class=\"link\" href=\"../../general-scripting/concept/c_ExtensionsToJellySyntax.html#r_GUIInputField\" title=\"This tag adds a reference to a UI macro that creates an input field on a page that allows users to input information. The ui_input_field passes a label, name, value, and size into the UI macro.\"><g:ui_input_field /></a></li><li class=\"linklist\"><a class=\"link\" href=\"../../general-scripting/concept/c_ExtensionsToJellySyntax.html#r_GUICheckbox\" title=\"This tag puts a user-editable check mark on a page. The name and value are passed into the UI macro.\"><g:ui_checkbox/></a></li></ul></div>\n</div>\n</div>\n<div class=\"topic reference nested1\" id=\"r_CallingUIMacros\">\n <h2 class=\"title topictitle2\" id=\"ariaid-title3\">Calling UI macros</h2>\n\n \n \n <div class=\"body refbody\"><p class=\"shortdesc\">Administrators can call UI macros from certain record types associated with the user\n interface.</p>\n\n \n<div class=\"tablenoborder\"><table cellpadding=\"4\" cellspacing=\"0\" summary=\"\" id=\"r_CallingUIMacros__table_j2v_pzq_rv\" class=\"table\" frame=\"border\" border=\"1\" rules=\"all\"><caption><span class=\"tablecap\"><span class=\"table--title-label\">Table 2. </span>Calling UI macros by record type</span></caption><colgroup><col /><col /></colgroup><thead class=\"thead\" style=\"text-align:left;\"><tr class=\"row\"><th class=\"entry cellrowborder\" style=\"vertical-align:top;\" id=\"d173310e465\">Record type</th><th class=\"entry cellrowborder\" style=\"vertical-align:top;\" id=\"d173310e468\">Example</th></tr></thead><tbody class=\"tbody\"><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e465 \">Dictionary attribute</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e468 \"><p class=\"p\">Display an icon for a reference field:</p>\n\n <pre class=\"pre codeblock\"><code>ref_contributions=ui_macro_name</code></pre></td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e465 \">UI page</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e468 \"><p class=\"p\">Display something on a UI page:</p>\n\n <pre class=\"pre codeblock\"><code><g:macro_invoke macro="ui_macro_name" /></code></pre></td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e465 \">UI macro</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e468 \"><p class=\"p\">Call a UI macro from another UI macro:</p>\n\n <pre class=\"pre codeblock\"><code><?xml version= "1.0" encoding="utf-8"&nbsp;?>\n<j:jelly trim= "false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">\n <g:ui_macro_name />\n <g:ui_macro_name_2 />\n</j:jelly></code></pre></td></tr></tbody></table>\n</div>\n\n </div>\n\n</div>\n<div class=\"topic reference nested1\" id=\"r_UIMacroForm\">\n <h2 class=\"title topictitle2\" id=\"ariaid-title4\">UI macro form</h2>\n\n \n \n <div class=\"body refbody\"><p class=\"shortdesc\">Each UI macro record consists of a name and an XML document written in Jelly\n code.</p>\n\n \n<div class=\"tablenoborder\"><table cellpadding=\"4\" cellspacing=\"0\" summary=\"\" id=\"r_UIMacroForm__table_sx5_bhr_rv\" class=\"table\" frame=\"border\" border=\"1\" rules=\"all\"><caption><span class=\"tablecap\"><span class=\"table--title-label\">Table 3. </span>UI macro fields</span></caption><colgroup><col /><col /></colgroup><thead class=\"thead\" style=\"text-align:left;\"><tr class=\"row\"><th class=\"entry cellrowborder\" style=\"vertical-align:top;\" id=\"d173310e567\">Field</th><th class=\"entry cellrowborder\" style=\"vertical-align:top;\" id=\"d173310e570\">Description</th></tr></thead><tbody class=\"tbody\"><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e567 \">Name</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e570 \">A unique and descriptive name for this macro.</td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e567 \">Active</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e570 \">Select the check box to render the element as defined. Clear the check box to\n disable the element without deleting the code. For example, the\n <span class=\"ph uicontrol\">email_reply</span> macro is inactive by default.</td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e567 \">Description</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e570 \">Describe the purpose of the macro and parameters passed to it.</td></tr><tr class=\"row\"><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e567 \">XML</td><td class=\"entry cellrowborder\" style=\"vertical-align:top;\" headers=\"d173310e570 \">Jelly script that defines the macro.</td></tr></tbody></table>\n</div>\n\n </div>\n\n</div>\n<div class=\"topic reference nested1\" id=\"r_CustomApprovalUIMacro\">\n <h2 class=\"title topictitle2\" id=\"ariaid-title5\">Custom approval UI macro</h2>\n\n \n \n <div class=\"body refbody\"><p class=\"shortdesc\">This section describes how to create a custom approval UI macro.</p>\n\n <div class=\"section\">\n <div class=\"note warning\"><span class=\"warningtitle\">Warning:</span> The customization described here was\n developed for use in specific instances, and is not supported by <span class=\"ph\">Now Support</span>. This method is provided as-is\n and should be tested thoroughly before implementation. Post all questions and\n comments regarding this customization to our community <a class=\"xref\" href=\"http://community.service-now.com/\" target=\"_blank\" rel=\"noopener noreferrer\">forum</a>.</div>\n\n </div>\n\n <div class=\"section\">\n <p class=\"p\"><span class=\"ph uicontrol\">Script Name</span>: Custom Approval UI Macro</p>\n\n <p class=\"p\"><span class=\"ph uicontrol\">Type</span>: UI Macro</p>\n\n <p class=\"p\"><span class=\"ph uicontrol\">Description</span>: Here is an option to get more detail out of the My\n Approvals view of an Execution Plan. This can be done by creating a new UI macro.\n Navigate to <span class=\"ph uicontrol\">System UI</span> and click <span class=\"ph uicontrol\">UI\n Macros</span>. First, you will need to rename the existing\n <code class=\"ph codeph\">approval_summarizer_sc_task</code> to something like\n <code class=\"ph codeph\">approval_summarizer_sc_task_old</code> and deactivate it. Then you\n will need to create a new one using the same name\n (<code class=\"ph codeph\">approval_summarizer_sc_task</code>). The name should basically tell\n you what the macro does and what it applies to. In this case, we're replacing an\n existing one so we decided to re-use the existing name.</p>\n\n <div class=\"p\"><div class=\"fig fignone\" id=\"r_CustomApprovalUIMacro__fig_ApprovalMacros\"><span class=\"figcap\"><span class=\"fig--title-label\">Figure 2. </span>Approval macros</span>\n \n <img class=\"image\" id=\"r_CustomApprovalUIMacro__image_ApprovalMacros\" src=\"../../useful-scripts/image/ApprovalMacros.png\" alt=\"\" />\n </div>\n</div>\n\n <p class=\"p\">Then you should copy the xml script at the bottom of this article into the xml code window\n in the new UI macro. This is great way to give some detail to an approver when you\n are doing line item approvals via approval tasks within the Service Catalog\n Execution Plans.</p>\n\n </div>\n\n <div class=\"section\"><h3 class=\"title sectiontitle\">The old way</h3>\n \n <p class=\"p\">This is the view you see in My Approvals when using an approval task via the old method.</p>\n\n <div class=\"p\"><div class=\"fig fignone\" id=\"r_CustomApprovalUIMacro__fig_MyApprovalsOld\"><span class=\"figcap\"><span class=\"fig--title-label\">Figure 3. </span>My Approvals (old way)</span>\n \n <img class=\"image\" id=\"r_CustomApprovalUIMacro__image_MyApprovalsOld\" src=\"../../useful-scripts/image/MyApprovalsOld.png\" alt=\"\" />\n </div>\n</div>\n\n <p class=\"p\">Notice there is not much detail telling the approver what they are actually approving. You can see the short description of the task but not much around what the item is.</p>\n\n </div>\n\n <div class=\"section\"><h3 class=\"title sectiontitle\">The new way</h3>\n \n <p class=\"p\">This is the view you will see if you use the xml script below in place of the OOB\n (out-of-box) UI macro.</p>\n\n <div class=\"p\"><div class=\"fig fignone\" id=\"r_CustomApprovalUIMacro__fig_MyApprovals\"><span class=\"figcap\"><span class=\"fig--title-label\">Figure 4. </span>My Approvals</span>\n \n <img class=\"image\" id=\"r_CustomApprovalUIMacro__image_MyApprovals\" src=\"../../useful-scripts/image/MyApprovals.png\" alt=\"\" />\n </div>\n</div>\n\n <p class=\"p\">Using this method you can see details much like the request approval. You have a link into the item ordered, \n a short description (which contains the ability to expand the variables from the item), price, quantity and the total price. \n This helps the approver in that it shows more detail. They can now see what they are actually approving.</p>\n\n <p class=\"p\">Script:</p>\n\n <div class=\"p\"><pre class=\"pre codeblock\"><code><?xml version="1.0" encoding="utf-8" ?>\n <j:jelly trim="true" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">\n <tr>\n <td class="label_left" width="100%">\n <label style="margin-left: 10px">\n ${gs.getMessage('Summary of Item being approved')}:\n <input style="visibility: hidden" NAME="make_spacing_ok"></input>\n </label>\n </td>\n </tr>\n <g:evaluate var="jvar_ni" expression="\n var sc_task = ${ref}.sysapproval;\n var sc_req_labels = new GlideRecord('sc_req_item');\n sc_req_labels.initialize();\n var sc_req_item = new GlideRecord('sc_req_item');\n sc_req_item.addQuery('request_item', sc_task.request_item.sys_id);\n sc_req_item.query();\n " />\n <tr>\n <td width="100%">\n <table width="100%">\n <tr>\n <td class="label_left" width="150px">\n <label style="margin-left: 10px">\n ${sc_task.request_item.request.opened_by.sys_meta.label}:\n </label>\n </td>\n <td>\n ${sc_task.request_item.request.opened_by.getDisplayValue()}\n </td>\n </tr>\n <tr> \n <td class="label_left" width="150px">\n <label style="margin-left: 10px">\n ${sc_task.request_item.request.requested_for.sys_meta.label}:\n </label>\n </td>\n <td>\n ${sc_task.request_item.request.requested_for.getDisplayValue()}\n </td>\n </tr>\n <tr>\n <td class="label_left" width="150px">\n <label style="margin-left: 10px">${gs.getMessage('Total')}:</label>\n </td>\n <td>\n <g:currency_format value="${sc_task.request_item.request.price}" />\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <j:set var="jvar_line_num" value="0" />\n <tr>\n <td width="100%">\n <table width="100%">\n <tr class="header">\n <td colspan="2">\n ${sc_req_labels.number.sys_meta.label}\n </td>\n <td>\n ${sc_req_labels.description.sys_meta.label}\n </td>\n <td>\n ${sc_req_labels.price.sys_meta.label}\n </td>\n <td>\n ${sc_req_labels.quantity.sys_meta.label}\n </td>\n <td>\n ${gs.getMessage('Total')}\n </td>\n </tr>\n <j:set var="jvar_item_price" value="${sc_task.request_item.price * sc_task.request_item.quantity}"/>\n <j:set var="jvar_overall_total" value="${jvar_overall_total + jvar_item_price}"/>\n <j:set var="jvar_line_color" value="odd"/>\n <j:set var="jvar_line_num" value="${jvar_line_num + 1}"/>\n <j:if test="${jvar_line_num % 2 == 0}">\n <j:set var="jvar_line_color" value="even"/>\n </j:if>\n <g:evaluate var="ni" expression="\n var smart_description = sc_task.request_item.cat_item.short_description;\n if (smart_description == null || smart_description == '' || smart_description == 'undefined')\n smart_description = sc_task.request_item.cat_item.name;\n "/>\n <tr class="${jvar_line_color}">\n <td valign="top">\n <g2:evaluate var="jvar_pop_target" expression="$[ref].getRecordClassName()" />\n <a class="linked" target="gsft_main"\n href="sc_req_item.do?sys_id=${sc_task.request_item.sys_id}"\n onmousemove="popListDiv(event, 'sc_req_item', '${sc_task.request_item.sys_id}','${sysparm_view}')"\n onmouseout="lockPopup(event)">\n <img src="images/icons/hover_icon.gifx" class="clsshort"/>\n </a>\n </td>\n <td valign="top">\n <a class="linked" target="gsft_main"\n href="sc_req_item.do?sys_id=${sc_task.request_item.sys_id}">\n ${sc_task.request_item.number}\n </a>\n </td>\n <td valign="top" width="50%">\n <g:call function="variable_summary_approval.xml" \n question_name="${sc_task.request_item.sys_id}"\n question_help_tag="${smart_description}" \n sc_req_item="${sc_task.request_item.sys_id}"\n help_class="${jvar_line_color}"/>\n </td>\n <td valign="top"> <g:currency_format value="${sc_task.request_item.price}"/> </td>\n <td valign="top"> ${sc_task.request_item.quantity}</td>\n <td valign="top"> <g:currency_format value="${jvar_item_price}"/></td>\n </tr>\n </table>\n </td>\n </tr>\n</j:jelly></code></pre></div>\n\n </div>\n\n </div>\n\n</div>\n</div>\n</body></html></div>"}</script>