Service Desk Practitioners Forum

Web-api record lists & sorting

Trusted Contributor.

Web-api record lists & sorting

Hi all,

I am using OVSD 4.5 SP23. I have written a JSP page which lists calls where the logged in users organisation ID, begins with the callers organisations ID.

Due to a single sign on requirement and the ability to use both web and fat clients at the same time, the jsp page logs in to ovsd using the system account and the criteria is added using addCriterium statements.

My question is around sorting of the data. We need to be able to sort the data by any of the columns that are in the list (ID, Caller, Description, etc). I cannot see anything in the API to do this?

I cannot do it from Service Desk and reference the view because the logged in user is the system account so the conditions aren’t correct.

Can anyone advise how to manually sort the IServicecall[] array?


Radovan Skolnik
Acclaimed Contributor.

Re: Web-api record lists & sorting

WEB-API does NOT contain any functionality to sort. If you need to sort you just use any sorting algorithm you want. IServicecall[] members are individual Servicall(s) from which you can retrieve any attribute and sort on that.

Speaking of SSO and using system account: there is no need for that. Have a look here for the complete solution: