Restrict Filters and Breadcrumbs (fixed queries) in Service Portal

Brian Lancaster
Tera Sage

I have used Restricted Filters in the past on menu options like My Approvals.  Is there a way to do something similar in service portal.  Basically we want to use Data Table form Instance Definition on the My Requests page but I don't want them to be able to remove anything from the default filter.  I still need them to be able to add to the filter and be able to remove anything they have added.  Just like in the standard UI.

 

find_real_file.png

1 ACCEPTED SOLUTION

sana11
Kilo Guru

Fixed!!

Guys I tried all possible ways to get a restricted filter for tables in portal, Nothing worked for me.

Finally I fixed it with the help of css.

I just copied selectors of each breadcrumb <a> tag from instance element and written below script in page- css not in widget-css.

.v339a5c41d7201200b0b044580e61030d .breadcrumbs span:nth-child(2) a ,
.v339a5c41d7201200b0b044580e61030d .breadcrumbs span:nth-child(3) a,
.v339a5c41d7201200b0b044580e61030d .breadcrumbs span:nth-child(4) > a.sp-breadcrumb-link.sp-breadcrumb-remove-condition.ng-scope{
pointer-events:none !important;
}

Now its perfect and user can able to access only last filter option in breadcrumb.

find_real_file.png

 

View solution in original post

27 REPLIES 27

Jag5
Tera Guru

Hi Brian,

You can hide the bread crumbs by cloning the Data Table from Instance Definition widget and change the value of Show breadcrumbs to false like below in server script. 

find_real_file.png

 

Thanks,

Jag.

 

Please mark the answer as CORRECT/HELPFUL as needed. 

I don't want to hide it as user may add there own filter on top of it and I want them to be able to remove the bread crumbs they added.  I just don't want them to be able to remove the default ones I set on the widget.  Just like you can do in regular interface based on the ServiceNow docs link I posted.

SaiRaviKiran Ak
Giga Guru

This sounds like it will make all bread crumbs on the data table widgets read only.  I only want to make it so that the breadcrumbs I set initially are read only like you can do in the normal UI using Restricted Filters.