Fetching Only latest version of Knowledge article in Catalog item variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2025 11:53 PM
Hi Everyone,
On the Catalog item I have a variable referencing the Knowledge article (kb_knowledge) table.
At the moment, the variable retrieves all versions of KB articles where the conditions are: Active = true and Workflow = published.
For example, if there’s a KB article like KB0001234, with versions 1.0, 2.0, etc., I want to display only the latest version (2.0) in the variable dropdown.
Currently, all active and published versions are being shown, which is not the desired outcome.
Could someone help with a solution for this?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 12:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 01:29 AM
Hello @Ankur Bawiskar @J Siva ,
For the article KB0001234, with versions 1.0 and 2.0, both versions are marked as Latest = true.
As a result, my reference variable is displaying both versions in the drop down.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 02:04 AM
then you need to use advanced reference qualifier and use script include and that script include function will only return the latest KB
But why would the earlier version be active and published?
Only the latest version should be active and published.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2025 02:04 AM
@Rakesh40 That shouldn't be the case. Something might be broken, or someone may have edited it.