Display only records with an empty related list

miyu
Tera Guru

I want to display only records with an empty related list on the list screen.
I do not want to display records for which a record has been set in the related list.
How can I do this?

1 ACCEPTED SOLUTION

Hi @miyu ,

 

Check below screenshots how to build and use scripted filter:

reshmapatil_0-1671082301874.pngreshmapatil_1-1671082332528.png

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

View solution in original post

5 REPLIES 5

SuhasPSalunkhe
Kilo Guru

Example -

Your main list is table1

Your related list is table2

 

You can do it by using Query business rule.

You have to write query BR on table1 and need to check for any reference is available in table2

reshmapatil
Tera Guru

Hi @miyu ,

 

We can write before query BR but it will affect all and I won't use that at all.

If you want to use it to show records for reporting purposes you can use the scripted filter.

Or you can create new module 'records with related list' and then add a scripted filter and make it a fixed filter.

 

Refer to below documentation for the scripted filter:

https://docs.servicenow.com/en-US/bundle/tokyo-platform-user-interface/page/use/using-lists/task/t_S...

 

Refer to the below documentation for the fixed filter:

https://docs.servicenow.com/en-US/bundle/tokyo-platform-administration/page/administer/list-administ...

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

Its completely on what is the use case here.

Hi @miyu ,

 

Check below screenshots how to build and use scripted filter:

reshmapatil_0-1671082301874.pngreshmapatil_1-1671082332528.png

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**