- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2020 02:32 AM
I am using Table REST API to fetch the task numbers, currently i am able to fetch tasks by applying two conditions that is #Assignment_Group and #State. Now I want to fetch data for fetching data based on 3 conditions (Assign group, state and #Item). i tried to do but no luck.
"XXXX/api/now/table/sc_task?sysparm_query=" \
"assignment_group%3Db045df67db2dc010a05b298a48961yh6%5Estate%3C3&" \
"sysparm_display_value=true&" \
"sysparm_exclude_reference_link=true&" \
"sysparm_fields=number"
Above link is working for me.
Attaching SS which contains all details about fields.
in attached image i want to apply filter on Assignment Group, State and Item field at a time.
If anyone know how to use conditions then please help to sort out.
Thank You!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2020 12:09 AM
Hi,
give query as below
XXXX/api/now/table/sc_task?sysparm_query=" \
"assignment_group%3Db045df67db2dc010a05b298a48961yh6%5Estate%3D3%5Erequest_item.item%3D<itemSysId>"
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2020 04:12 AM
Hi Nanasaheb,
try adding the below query in the api end point and let me know.
"XXXX/api/now/table/sc_task?sysparm_query=" \
"assignment_group%3Db045df67db2dc010a05b298a48961yh6%5Estate%3C3%5Eparent.cat_item%3D<sys_id of catalog item>"
Please mark this answer correct if it resolved the query and mark it helpful too if it helped you at all
Thanks,
Mohit Kaushik
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2020 10:50 PM
Hi NanaSaheb,
Did you try the above code?
Thanks,
Mohit
Mohit Kaushik
ServiceNow MVP (2023-2025)