Can not query for inner fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 06:38 AM
Hi, I'm new to the community so I'm not sure if this question is in the right forum but please help me if you know the answer.
I am using ServiceNow integration with Cortex XSOAR (Palo Alto). So there are several servicenow scripts and commands to query for tables. When I use the !servicenow-query-users script, it seems to query from a user-related table, if I specified raw-response=true, I can see that each record is like a JSON object. I notice that there are fields which are JSON objects too, for example:
location: {
country: Indonesia,
city: Jakarta
}
I now want to query using values of these inner fields, like:
!servicenow-query-users query="location.countryENDSWITHsia"
The query could run, but the results are not correct from what I expected. It just throw random records.
How can I query using inner fields like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2025 07:23 AM
Hi @vnu_21020620 ,
Try something like below.
!servicenow-query-users query="location.country='Indonesia'"
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------