- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2025 09:05 AM
Hello,
I'm experiencing an issue where HTML type variables (as well as label and macro UI types) are not being displayed in the Ticket Fields widget in Service Portal. I was directed to KB article KB0820434 which explains that modifying a specific line in the widget’s HTML should resolve this issue. According to the KB, the line in question is:
<div class="m-b break-word" ng-repeat="variable in data.variables | filter:{visible_summary:true}">
However, after thoroughly reviewing the Ticket Fields widget’s HTML code in my instance, I couldn’t find this line (line 37) or any similar code snippet that would allow me to apply the suggested fix.
Could someone please help me understand:
- Where can I locate this line or the equivalent logic within the Ticket Fields widget?
- How can I adjust the widget to ensure that HTML type variables are properly displayed on the Service Portal?
Any guidance or pointers to documentation would be greatly appreciated.
Thank you in advance for your help.
Best regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2025 08:37 PM
Hi @ghzelmed,
I was able to reproduce and solve the issue on my PDI.
Problem:
The issue is that the function isVisibleSummary() returning false for HTML variables although "Visible on Summaries" is set to true on the variable.
My HTML Variable (Visible on Summaries = true):
Variables from the widget (visible_summary = false):
(I would truly appreciate if you could follow-up with ServiceNow and share update on this).
Solution:
- Create a new Script Include
- Copy all the functions from the existing script include (GlobalServiceCatalogUtil)
https://YOUR_INSTANCE.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=a80a35798358665004d... - Look for the function getVariablesForTask
- Replace the highlighted line with true (This would make all variables visible on your Ticket Fields Widget even if they have Visible on Summaries set to false: But I guess that is also the approach suggested from ServiceNow, to edit the HTML line which is unfortunately not there anymore)
- On your Cloned "Ticket Fields" widget, replace the Script Include name on your Server Script as highlighted below:
- Make sure the Cloned Ticket Fields Widget is the one on your Portal page.
What you could do to make it better, instead of always setting the value to true. You can create a new function on your script include and return true or false based on the value of visible_summary on your variable and use the returned value of this function.
Results:
OOTB Ticket Fields Widget (HTML field not visible):
Cloned Ticket Fields Widget (HTML field visible):
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2025 03:26 PM
Hi, Yep, it s not empty.
And the html script is OOB and were not modified.
That s why i published my question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2025 08:37 PM
Hi @ghzelmed,
I was able to reproduce and solve the issue on my PDI.
Problem:
The issue is that the function isVisibleSummary() returning false for HTML variables although "Visible on Summaries" is set to true on the variable.
My HTML Variable (Visible on Summaries = true):
Variables from the widget (visible_summary = false):
(I would truly appreciate if you could follow-up with ServiceNow and share update on this).
Solution:
- Create a new Script Include
- Copy all the functions from the existing script include (GlobalServiceCatalogUtil)
https://YOUR_INSTANCE.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=a80a35798358665004d... - Look for the function getVariablesForTask
- Replace the highlighted line with true (This would make all variables visible on your Ticket Fields Widget even if they have Visible on Summaries set to false: But I guess that is also the approach suggested from ServiceNow, to edit the HTML line which is unfortunately not there anymore)
- On your Cloned "Ticket Fields" widget, replace the Script Include name on your Server Script as highlighted below:
- Make sure the Cloned Ticket Fields Widget is the one on your Portal page.
What you could do to make it better, instead of always setting the value to true. You can create a new function on your script include and return true or false based on the value of visible_summary on your variable and use the returned value of this function.
Results:
OOTB Ticket Fields Widget (HTML field not visible):
Cloned Ticket Fields Widget (HTML field visible):
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2025 09:23 AM
Thank you! I'll check with ServiceNow regarding why the summarize_visible attribute had a value of false instead of true. Your suggestion to verify the XML directly and question the displayed UI value for visible_summary was incredibly insightful—it really helped pinpoint the root cause. I greatly appreciate your thorough investigation and the time you've dedicated to resolving this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2025 10:14 AM
I am glad I could help. Thank you!
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.