How to add fix query in the breadcrumbs filter in service portal

RuhiJ5906447193
Tera Contributor

Hi all, 

The requirement is to show the list of articles on portal with bread crumbs filter and add the fix filter as 'knowledge base is IT and workflow state is Published.'(No one should be allowed to remove the filter)
I have used the OOTB widget- 'Data Table from URL Definition' for above requirement.

Did some R n D, and found that inside this widget, another OOTB widget- 'Data table' is called and inside that another OOTB widget 'Filter Breadcrumbs' is called.
By default, breadcrumb filter was not shown on the list.
I added below piece of code in 'Additional option, JSON format' in 'instance with table' for widget 'Data Table from URL Definition' and now I can see the breadcrumb filter.
{
"enable_filter": {
"value": "true",
"displayValue": "true"
}
}
The breadcrumb filter(All)l looks like below-

RuhiJ5906447193_0-1736402811304.png

 

The issue now is I want to add the fixed query in a filter as 'Knowledge base is IT and Workflow state is Published.'
I tried adding below code in the same place where above code of enabling filter was written.
But it is not working.
Can someone please help on how and where to add the fixed query in the filter which can't be removed from the filter by any user although user can add other filters along with the fixed filter but cannot remove the fixed query?
Any help is appreciated.
@Ankur Bawiskar @Mike Patel @Dr Atul G- LNG Can you please help here

Thanks in advance.

Thanks in advance

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

@Sandeep Rajput can u help here.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@RuhiJ5906447193 

check these links and you should be able to achieve

Using sysparm_fixed_query as a filter in "Data table from Instance Definition" widget 

Fixed query in a "Data Table From Instance Definition" widget? 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader