How to enable filter in the sp portals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2023 10:12 PM
I have created a Widget for database view in the Sp portals , i need to enable the filter in the widget, how to do that?
on clicking the Ctrl+right click --> the instance option is not enabled,
how to make enable in the widget, any one suggest me with your ideas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2023 10:44 PM
Hi @servicenow lath ,
Data Table from URL definition widget
Data table from instance definition widget
Both "Data Table from URL definition widget" and "Data table from instance definition" embed the same widget "widget-data-table".
If you're using Data Table from Instance definition the filter has to be set in the widget instance options. You can make it work by passing 'enable_filter' as true.
These Community conversations contain additional information:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2023 11:01 PM
Hi,
Please find the below link and let me know whether it is useful or not.
https://www.servicenow.com/community/developer-articles/adding-instance-options-to-directly-embedded...
Thanks
SP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2023 01:45 AM
Filters with a data table within the Service Portal
So this is my first share project, and I will be using this article to further explain the why's and how's for the project.
Why
We started using the CSM module, and the page used "csm_my_lists" is using a script which is read only. So you have no ability to change the "filters" as needed. Hence came the idea to use the filtering already provided by ServiceNow.
The filters shown are based on how you save the filter (visible to:)
- Me = Personal Filters
- Everyone = Global Filters
- Group = Group Filter
How to use
- Simply create a new filter for example within the incident table, save this filter (me, group, public)
Be sure to create "unique" names else the selection will highlight both of the selected filters. Create a menu link to the page (for example: /sp?id=filtered_data_table&table=incident)
The saved filter will now appear on the page for the service portal users, based on the table used.
Example
This is the OOTB csm_my_lists
This is the version I've created with the page: filtered_data_table
And you can even change the titles (Global/Group/Personal)
Now you can use the flexibility the filtering system ServiceNow offers to change it as needed.
Styling
You can change the page properties and CSS to fit your specific needs.
Example, fluid layout with table styling.
Tips
Making a filter selected by default
Select the filter you want as a starting point copy the url, and change the current menu link with a selected filter:
Example: "/sp?id=filtered_data_table&table=incident&view=ess&sel=active_for_me"
Making only a certain public filter available
Simply add a new field within the filter table for instance a field called "Show on portal", select the filter you do like to share. Adjust the widget options encoded query with this new field: "u_show_on_portal=true";