How do I filter empty rows with REST API?

Rajanmehta
Mega Guru

Hi

I am making REST API call on a table with fields A, B and C.

Please let me know how can I append the query in URL not to bring rows when field A is Null?

Thanks in advance.

https://xxx.service-now.com/api/   ....   TABLE_NAME?....   &sysparm_fields=Column_A%2CColumn_B%2CColumn_C&Column_A!=''

1 ACCEPTED SOLUTION

Jon Barnes
Kilo Sage

You should be able to append an encoded query like this:



sysparm_query=column_aISNOTEMPTY


View solution in original post

5 REPLIES 5

Jon Barnes
Kilo Sage

You should be able to append an encoded query like this:



sysparm_query=column_aISNOTEMPTY


Thanks Jonathan.



That was very helpful.



Thanks,



Rajan Mehta


in the same manner i tried hitting

https://<server_ip>/api/space/managed-domain/ctps?filter=descriptionISNOTEMPTY  or

https://<server_ip>/api/space/managed-domain/ctps?filter=descriptionISEMPTY

But this didn't work showing syntax error in postman.

Actually i want to filter and get the records where description row is empty.

When I am trying with "https://<server_ip>/api/space/managed-domain/ctps?filter=(description eq NULL) " its giving zero result.

I want to get the result of empty description.Can you pls help me here.