How to display only published articles in ecportal servicenow

sri vijaya
Tera Expert

Hi

Right now, in our portal all the Knowledge articles are displaying , but we need to restrict that to only published articles should be displayed and retired/oudated articles should not displayed

what is the configuration we need to do for this? Please help for this issue

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @sri vijaya 

Refer KB: KB0778944 Outdated version of the article is still visible to the end users 

Cause

On the ServiceNow platform, the old versions of the KB articles are NOT blocked from viewing for the end-users if they have the DIRECT URL of the Old version of the KB article

But whenever they search for the KB articles [Global Search, Self Service Search, KB Portal search] only the latest version of the KB article is displayed.

 

Customization for expected feature:

  • Open the widget displaying the articles
  • Review the Server Script.
  • Ensure the GlideRecord query explicitly filters out retired states. Use any of the code snippet.
    gr.addQuery('workflow_state', 'published');

Or

 add gr.addQuery('workflow_state', 'NOT IN', 'retired');)

 

Refer:

https://www.servicenow.com/community/incident-management-forum/want-to-show-kb-article-in-pending-re...

 https://www.servicenow.com/community/knowledge-managers/why-are-retired-articles-viewable-on-service...

 

https://www.servicenow.com/community/servicenow-ai-platform-forum/how-to-display-knowledge-articles-...

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

SupriyaWaghmode
Mega Sage

Hello @sri vijaya  , 

Below are trouble shooting points :

1.Configure Portal Search Sources
If retired articles are showing up specifically when users use the search bar, the issue lies in your portal's Search Source script or conditions.
  • Fix: Navigate to All > Service Portal > Portals and open your active portal record.
  • Scroll down to the Search Sources related list and open the Knowledge search source (often named kb or Knowledge Base).
  • Check the Data Source tab. Ensure the condition builder or script includes:
    Workflow IS Published (or workflow_state=published).
  • If it uses a script, ensure the encoded query string contains ^workflow_state=published.
 
3. Check System Properties for Knowledge Filtering
ServiceNow uses global system properties to dictate how knowledge search behaves across portals.
  • Fix: Type sys_properties.list in your application navigator filter.
  • Search for the property named glide.knowman.search.show_vendor_states or properties starting with glide.knowman.content_states.
  • Ensure that states like retired, draft, or outdated are not included in the list of publicly viewable content states for end-users.
  • Verify glide.knowman.search.show_retired is set to false.

If my response helped you, please click on accepted the solution and consider giving it a thumbs-up👍. This helps others find the solution faster and keeps the community thriving. Thank you for your support!😊

Thanks & Regards ,
Supriya Waghmode |ServiceNow Community Rising Star 2025
www.linkedin.com/in/supriya-waghmode