Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Where object - 'or' criterium

SOLVED
Go to solution
Highlighted
Paweł Brzózka
Super Collector

Where object - 'or' criterium

Hi,

Is it possible to create 'or' criteriums on WEB-API Where object??

I mean I create Where object - for example IServiceCallWhere and I can add criteriums to this object, but if I add 2 or 3 criterium it will be like 'and' separator. And I would like to create 'or' statement. For example I would like to find servicecalls which nnumer is 150000 or 170000. Is it posiible via WEB-API??
5 REPLIES
Radovan Skolnik
Honored Contributor
Solution

Re: Where object - 'or' criterium

No, that is not possible. The only thing I can advise is do as many separate queries as there are your criteria and do the union on results in your code. I know it disappoints but that is the way HP implemented it even tough the underlying infrastructure allows for using OR, NOT and various other criteria. For some reason they chose not to make these available in WEB-API.

Paweł Brzózka
Super Collector

Re: Where object - 'or' criterium

I just thought that :( but I belived there's the way to do that (not using union queries).
Thank you for dispel my doubts.
Radovan Skolnik
Honored Contributor

Re: Where object - 'or' criterium

There is a way: using internal API. It's not documented any more (was in 4.0). Provides all you can do in GUI.
Gurevich
Member

Re: Where object - 'or' criterium

Radovan, can you share docs for 4.0?
Radovan Skolnik
Honored Contributor

Re: Where object - 'or' criterium

Probably cannot redistribute them. But I guess they should be available on support site...
//Add this to "OnDomLoad" event