Trying to use Table REST API to query variable values for a request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Based on the information shared in this blog:
https://www.supernow-blog.com/blog/querying-related-tables.html
I'm trying to grab a specific variable value for a Request. What I have so far:
URL: https://{{baseURL}}/api/now/v1/table/sc_item_option_mtom
For sysparm_query, I'm using:
request_item=[Request's sys_id]
^JOINsc_item_option_mtom.sc_item_option=sc_item_option.sys_id
^JOINsc_item_option.item_option_new=item_option_new.sys_id!name=[name of variable]
For sysparm_fields:
request_item,sc_item_option.sys_id,sc_item_option.value,sc_item_option.item_option_new.name,sc_item_option.item_option_new.reference
But it doesn't work if the last part, !name=[xxx] is included.
Without specifying name, I will get a list of all variable/value for that Request. With name, I get 0 result.
That syntax should be valid according to the blog (I keep the left table different for the two JOINs), and my own testing using a single JOIN.
How can I make it work for two JOINs?