How to create query for sys_id "is not in" for the reference field

Shruti D
Kilo Sage

I want to apply a filter on custom table in which the related item field is a ref type field. By using this field I want to check multiple sys_ids with "Not In" query. How can I apply the filter?

1 ACCEPTED SOLUTION

Rushi Savarkar
Kilo Sage
Kilo Sage

Hello @Shruti

Hope you are doing well!

 

Please find below the code and apply it in your encodedQuery: 

addEncodedQuery("ref_field_nameNOT IN"+array_name); //if there are multiple sys_ids

 Thank you!

If my response helped you, please accept the solution and mark it as helpful.
Thank You!

View solution in original post

2 REPLIES 2

Rushi Savarkar
Kilo Sage
Kilo Sage

Hello @Shruti

Hope you are doing well!

 

Please find below the code and apply it in your encodedQuery: 

addEncodedQuery("ref_field_nameNOT IN"+array_name); //if there are multiple sys_ids

 Thank you!

If my response helped you, please accept the solution and mark it as helpful.
Thank You!

Mark Manders
Mega Patron

You will need to add them separately (fyi: that sysid is probably not the display value, so you need to select the display value of the referenced records and than just add 'is not .... AND is not .... AND is not ...'


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark