Service Desk Practitioners Forum
cancel

Java - error when querying on multiple statuses?

SOLVED
Go to solution
Highlighted
Michael Tutty
Contributor.

Java - error when querying on multiple statuses?

When I run this code:

IStatusServicecall[] statuses = ssch.findAllStatusServicecall();

IServicecallWhere scw = sch.createServicecallWhere();
scw.addCriteriumOnStatusRange(statuses);

IServicecall[] results = sch.findServicecall(scw);


I'm seeing a JDBC error come back from the HP/SD server on the findServicecall() method. I can submit each status from the list individually, and that works fine.

Any ideas on what's wrong?

Thanks!
M.
2 REPLIES
Tommy Koronen_1
Super Contributor.
Solution

Re: Java - error when querying on multiple statuses?

Hi,

The addCriteriumOnStatusRange method only expects two values.
The range is specified by the starting Status as element 0 and the ending Status as element 1 in the array.

BR/Tommy
Michael Tutty
Contributor.

Re: Java - error when querying on multiple statuses?

Thanks for the answer - that should work fine for my needs.

Can you tell me if there's a JavaDoc or other documentation available for the web-api JAR? No one in my organization seems to know where to find an SDK of any sort. I've been flying blind for the most part.