- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2016 11:10 PM
HI all,
I'm new to servicenow development. I need to access Incidents table in my developer instance via REST table apis. E.g I need those records having State=Closed or State=Awaiting Problem for a specific user (name: XYZ). But I'm not able to implement OR condition in the table api query. I'm hitting the table from an external service made in javascript. Here is my query form
("get", "https://devxxx.service-now.com/api/now/table/incident?sysparm_limit=10&sysparm_fields=location,numbe...");
Here I need to implement a OR query so as to fetch records for state=Awaiting Problem.
A quick response wolud be highly appreciable. Thanks in advance.
POSTED BY AKSHAY
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 03:33 AM
Hello,
You have to send a sysparm_query along with the link:
example:
Your link(should work now): https://devxxx.service-now.com/api/now/table/incident?sysparm_limit=10&sysparm_fields=location,numbe...
for an AND operator use ^
for an OR operator use ^OR
You can get this encoded query from any List view :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 03:26 AM
My recommendation is build the query you want in the list filter first. For example,
Next, right click on the right-most breadcrumb to copy the query
Use the copied value as your sysparm_query

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 03:27 AM
Oops, forgot me reference link: Using Filters and Breadcrumbs - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 03:33 AM
Hello,
You have to send a sysparm_query along with the link:
example:
Your link(should work now): https://devxxx.service-now.com/api/now/table/incident?sysparm_limit=10&sysparm_fields=location,numbe...
for an AND operator use ^
for an OR operator use ^OR
You can get this encoded query from any List view :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2016 05:44 AM
Thanks Santosh and Chuck. It was a big help. I understood what I was missing.