Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to create a List Filter on a table

Kamva
Giga Guru

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

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@Kamva 

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.

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

@Ankur Bawiskar Tried your suggestion, it doesn't work

@Kamva 

it should work fine.

did you use correct field name and choice value?

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