- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2016 01:38 PM
Hi all,
I am trying to retrieve incidents of a particular company from ServiceNow via REST API 'get' method. According to the wiki tutorial I have to pass the sys_id of company in sysparm_query parameter to filter out. But I want to pass the display value only; not the sys_id of it as i will not have the sys_id's of all companies in external clients/apps.
Please Help
Thanks
Sid
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2016 01:47 PM
You should be able to dotwalk to the name field. This query should work to pull incidents where the company field on the incident is "Company Name".
sysparm_query=company.name=Company Name

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2016 01:47 PM
You should be able to dotwalk to the name field. This query should work to pull incidents where the company field on the incident is "Company Name".
sysparm_query=company.name=Company Name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2016 01:51 PM
All this time I was trying with quotes around the string. Now I removed the quotes and It worked.
Thanks a lot Brad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2016 01:58 PM
A really easy way to generate the query string with the right syntx is to use the filter to build the query in servicenow, then right click and copy the query.
Encoded Query Strings - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 11:03 PM
Hi Brad,
I am trying to filter the Application Records based on the Assignee name in my Rest Api call, Assignee field is a reference fields of Users table.
in that case how I will pass the assignee value for filtering the records in sysparm_query
Thanks and Regards,
Subrata