- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 07:49 AM
On clicking the menu item "Case Management", the case table needs to be filter.
instead of filter ="null", can we call a script include?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2024 01:01 PM - edited 08-08-2024 01:01 PM
Hi,
What type of widget are you working with? Data table?
You may need to clone the widget, but you can apply the filter via script include upon load (after they click the menu link) then remove the option (widget attribute) from showing breadcrumb/filter that allows them to get around your strict filter.
You can still leave the keyword search there to help (this only allows them to search within their respective results), but the overall filtering is limited to what your script include allows them to see/work with.
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
08-07-2024 11:15 AM
Hi,
Unfortunately, the menu item must be static and can't be dynamic such as by using a script include. Here's another post where the same was discussed: https://www.servicenow.com/community/developer-forum/dynamic-url-in-menu-item/m-p/1629310
Alternatively, you'd probably have the filter the results once the user landed on the page you're directing them to via another means.
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
08-08-2024 12:42 PM
Hi,
Is there an alternative way to apply a dynamic filter? I currently use a script include because I need to check the contacts from the "Account Relationship" table. If these contacts have a specific role, then filter the cases related to those contacts and the associated account.
I have made changes in the widget to achieve the output but I am still able to search the other cases.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2024 01:01 PM - edited 08-08-2024 01:01 PM
Hi,
What type of widget are you working with? Data table?
You may need to clone the widget, but you can apply the filter via script include upon load (after they click the menu link) then remove the option (widget attribute) from showing breadcrumb/filter that allows them to get around your strict filter.
You can still leave the keyword search there to help (this only allows them to search within their respective results), but the overall filtering is limited to what your script include allows them to see/work with.
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
08-16-2024 02:17 PM
I just wanted to check-in and see how you're doing.
If my initial reply helped answer your question (wondering if you can/how to use script include in a portal menu item), please mark my reply above as "Accept Solution".
Thank you!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!