- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 11:37 AM
I have a requirement that involves adding an additional field to the top section of the kb_view ui page. Currently the Article, Published and Last Modified fields are available on the page. I need to add a new field called Role, then query the Knowledge article to display the role that is listed. I have attached a screen shot. Has anyone done this before?
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2015 07:30 AM
There is macro called kb_article_header u need to modifiy that but in that case u own it and in future relse u will not get Updates.So better to create a custom macro and call that in UI page.
And roles is a glide list so u might have to create a array and publish each element.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div class="kb_article_header_short_description">$[kb.short_description.getDisplayValue()]</div>
<!-- outputs an article's header info: number, publication date, modification date -->
<div class="kb_article_header_info">
<span style="font-weight:bold;">${gs.getMessage("Article")}:</span>$[SP]$[JS,HTML:kb.number]
<span style="font-weight:bold;padding-left:8px;">$[kb.published.sys_meta.label]:</span>$[SP]$[kb.published.getDisplayValue()]
<g2:evaluate var="jvar_updated_date">
var dgo = kb.sys_updated_on.getGlideObject();
var dt = new GlideDateTime(dgo);
dt.getLocalDate().getDisplayValue();
</g2:evaluate>
<span style="font-weight:bold;padding-left:8px;">${gs.getMessage("Last modified")}:</span>$[SP]$[jvar_updated_date]
<span style="font-weight:bold;padding-left:8px;">${gs.getMessage("Roles")}:</span>$[kb.roles]
</div>
</j:jelly>
Please mark ur question as marked .If it has helped u.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 07:40 AM
Hello All,
I have similar kind of requirement but it should only be apply at SOW (Service Operation Workspace), Current behavior is OOB it shows only Knowledge Base| KB Category, Read Time, last Updated time, Number of views, Average rating, article content and as per the ServiceNow docs, can please any help me to update the header only for SOW UI.
Thanks