Send query parameter as OR condition in REST call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:40 AM
Hi Team,
Setting a query parameter value in REST Message in IH or native considers that query parameter as AND and sends it in the URL.
Is there any way that we can configure one of the parameter to be sent as OR? or setting endpoint is script is the only way? If yes what's the syntax for OR?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 03:58 AM
Hello @ShAn21 ,
I feel do it via script is the only way using REST MESSAGE V2 API you need to hit the endpoints.
Basically you need to pass parameters in a dynamic way to the scripted API .lets says you need if your condition A is satisfied you will pass one query parameter and condition B is satisfied will ignore the other parameter and add another one
Hope this helps
Mark the answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 04:05 AM
it all depends on how the endpoint accepts the value.
Did you check that and try postman?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 07:53 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader