How to create a List Filter on a table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 08:32 AM
Hi Everyone,
I am trying to create a default filter for every users using our system, this table is not accessible by a module, you have to search it by table_name.LIST.
My attempt in achieving this business requirement by creating a Business Rule to run When is before with the below code, but it didn't work either.
(function executeRule(current, previous /*null when async*/) {
current.addQuery('install_status', '1');
})(current, previous);
I have ran out of ideas now, can anyone please assist?
Regards,
Kamva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 08:53 AM
you should use before query business rule with proper query.
Form the query on table.list and then copy the query then use in business rule
current.addEncodedQuery('<YourQuery>');
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 09:10 AM
@Ankur Bawiskar Tried your suggestion, it doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 09:06 PM
it should work fine.
did you use correct field name and choice value?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader