Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to show list of parent records without children records

peter_repan
Kilo Sage

Hi all,

I have a tables with relationship 1:N. (TableA   1---->N TableB).

I want to show a list of records from TableA, for which do not exist any records in table B.

How can I do it?

My first try was through condition where "sys_id NOT IN javascript:custom_func()", but custom_func() returns hundreds of sys_ids.

This approach is not working because of URL length restriction.

I should probably find a way where the system does not put all filter conditions into URL.

Any other ideas?

Thank you

5 REPLIES 5

MGanon
Tera Guru

I thought that I had resolved a similar issue until I saw your post about length constraints for the not in array. If you still have the issue, there might still be some use in this thread and the script that I drafted:

https://community.servicenow.com/community?id=community_question&sys_id=df874b13db0cc81013b5fb2439961975