- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 11:04 AM
I search the forum and the only solution i saw is on this link and about 3years old
https://community.servicenow.com/community?id=community_question&sys_id=07000721db98dbc01dcaf3231f961924
I dont want to go this route. Is there any other alternative ?
Thanks
Phil
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 01:44 PM
Hi,
Not fully sure if this is what you're asking, but the search source for Knowledge for the Portal is only set to look at "Published" for the workflow state, so you should be able to add a simple "OR" query to get it working how you want:
Service Portal > Search Sources > Knowledge, look for this:
can change out line 5 with:
kb.addEncodedQuery('workflow_state=published^ORworkflow_state=pending_retirement');
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 01:31 PM
We have implemented "pending retirement" functionality or KB article using state field on kb_knowledge table.
We have configured workflow on kb_knowledge table to set different KB article states based on our requirements.
In workflow, we creat tasks for retiring kb article to different groups based on CIs on kb_knowledge table.
The state of kb article is updated to pending retirement unless task is open.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2019 01:44 PM
Hi,
Not fully sure if this is what you're asking, but the search source for Knowledge for the Portal is only set to look at "Published" for the workflow state, so you should be able to add a simple "OR" query to get it working how you want:
Service Portal > Search Sources > Knowledge, look for this:
can change out line 5 with:
kb.addEncodedQuery('workflow_state=published^ORworkflow_state=pending_retirement');
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2020 05:35 AM
Hi
Iam looking for the solution related to this same. but here i need retired articles to be visible. I tried with this code(kb.addEncodedQuery('workflow_state=published^ORworkflow_state=retired'); . but it is not working. is any other changes required on this script.
could you please advise me!
Regards,
Mounika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2022 08:58 AM
@Allen Andreas I am in Tokyo, I don't have a knowledge record in search sources. Any inputs?