The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Send query parameter as OR condition in REST call

ShAn21
Tera Guru

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

3 REPLIES 3

Mohith Devatte
Tera Sage
Tera Sage

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

Ankur Bawiskar
Tera Patron
Tera Patron

@ShAn21 

it all depends on how the endpoint accepts the value.

Did you check that and try postman?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@ShAn21 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader