programmer561
programmer561

Reputation: 41

How to search using Table API

I want to figure out how to search a table's field for a keyword and return the rows that match. i.e. search for the word apple in the description field on a post table.

https://docs.servicenow.com/bundle/newyork-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html#r_TableAPI-GET

Upvotes: 0

Views: 4203

Answers (1)

Suhaib Janjua
Suhaib Janjua

Reputation: 3572

If you are using ServiceNow TABLE API to fetch results then you could the following on any column of any table. All you need to do is to use sysparm_query parameter with CONTAINS keyword on the column that you are trying to search.

For example:

I want to fetch all the incidents that contains unable to connect string in the descriptions.

https://myinstance.service-now.com/api/now/v2/table/incident?sysparm_query=descriptionCONTAINSunable+to+connect

It returned all the incidents records that contains unable to connect string in there descriptions.

enter image description here

Upvotes: 1

Related Questions