- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 09:15 AM
Hi,
On the Approval Form, when the approval manager opens a record and click on Description it gives the details of all the Variables coming from RITM record. But our client want to display only filled variable but not empty variables is it possible ?
As shown in the image we want to display only short description since it contains information but the description variable is empty so we dont want to display that.
Please help me how to fix this
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 10:34 AM
Very weird and I can only presume an Orlando bug?
I resolved this issue on your instance by storing the value and doing a comparison to null
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate jelly="true">
var set = new GlideappVariablePoolQuestionSet();
if (!JSUtil.nil(jelly.jvar_sc_req_item))
set.setRequestID(jelly.jvar_sc_req_item);
if (!JSUtil.nil(jelly.jvar_sc_task))
set.setTaskID(jelly.jvar_sc_task);
set.load();
</g:evaluate>
<table cellspacing="0" cellpadding="0" width="100%" data-sn-macro-sys-id="${jvar_macro_sys_id}">
<j:forEach var="jvar_question" items="${set.getFlatQuestions()}">
<j:if test="${jvar_question.isVisibleSummary()}">
<j:set var="jvar_valuekma" value="${jvar_question.getDisplayValue()}"/>
<j:if test="${jvar_valuekma != ''}">
<g:summarize_question question="${jvar_question}" />
</j:if>
</j:if>
</j:forEach>
</table>
</j:jelly>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 02:01 PM
Can you attach an image of the approval_variable_summary so I can see if there are any issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2020 10:30 PM
Hi
Here is my code, i just copy pasted
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate jelly="true">
var set = new GlideappVariablePoolQuestionSet();
if (!JSUtil.nil(jelly.jvar_sc_req_item))
set.setRequestID(jelly.jvar_sc_req_item);
if (!JSUtil.nil(jelly.jvar_sc_task))
set.setTaskID(jelly.jvar_sc_task);
set.load();
</g:evaluate>
<table cellspacing="0" cellpadding="0" width="100%" data-sn-macro-sys-id="${jvar_macro_sys_id}">
<j:forEach var="jvar_question" items="${set.getFlatQuestions()}">
<j:if test="${jvar_question.isVisibleSummary()}">
<j:if test="${jvar_question.getDisplayValue()}"> <!--Added to remove null vars-->
<g:summarize_question question="${jvar_question}" />
</j:if> <!--Added to remove null vars-->
</j:if>
</j:forEach>
</table>
</j:jelly>
https://dev51896.service-now.com/nav_to.do?uri=%2Fsys_ui_macro.do%3Fsys_id%3Dff6287f80a25810300fdb97e7fb82ddf%26sysparm_domain%3Dnull%26sysparm_domain_scope%3Dnull
shaik
12345
can you please help me on this ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 10:34 AM
Very weird and I can only presume an Orlando bug?
I resolved this issue on your instance by storing the value and doing a comparison to null
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate jelly="true">
var set = new GlideappVariablePoolQuestionSet();
if (!JSUtil.nil(jelly.jvar_sc_req_item))
set.setRequestID(jelly.jvar_sc_req_item);
if (!JSUtil.nil(jelly.jvar_sc_task))
set.setTaskID(jelly.jvar_sc_task);
set.load();
</g:evaluate>
<table cellspacing="0" cellpadding="0" width="100%" data-sn-macro-sys-id="${jvar_macro_sys_id}">
<j:forEach var="jvar_question" items="${set.getFlatQuestions()}">
<j:if test="${jvar_question.isVisibleSummary()}">
<j:set var="jvar_valuekma" value="${jvar_question.getDisplayValue()}"/>
<j:if test="${jvar_valuekma != ''}">
<g:summarize_question question="${jvar_question}" />
</j:if>
</j:if>
</j:forEach>
</table>
</j:jelly>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 12:02 PM
I think so it might be an issue with Orlando.
So you just make changes to this UI Macro approval_variable_summary right ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 12:13 PM