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.

Use string filters in REST API queries

srihari3
Kilo Contributor

Hi,

I am trying to filter the responses for REST query

`https://XXXX.service-now.com/api/now/table/sys_db_object?sysparam_query=sys_nameLIKEDia`

I read that the sysparm_query=column_aISNOTEMPTY would work. As documented in How do I filter empty rows with REST API?   I am trying to filter on sysparam_query=sys_nameLIKEDia and failed.

Could anyone point me to the flaw and help me filter the response on string columns.

Thank you

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Hi,



Just add the following line in your sysparm_query



nameLIKEia



I think sys_name is not a field name?



Thank You


Please Hit Like, Helpful or Correct depending on the impact of response


View solution in original post

5 REPLIES 5

reginabautista
Kilo Sage

Hi Sri



You need to change your query to below. You should remove the sys_ and just leave 'name'. Also I think sysparm was misspelled. It should be sysparm and not sysparam




Try   this:


`https://XXXX.service-now.com/api/now/table/sys_db_object?sysparm_query=nameLIKEia