Re: Does ars_GetListEntry supports sorting...
Brought to you by:
jeffmurphy
|
From: Joel M. <jm...@ca...> - 1996-03-27 23:18:50
|
> Hi Joel, > > We're building some application which use your ARSperl interface, > a wonderful perl interface to Remedy. I run into a need of trying > to sort the entry coming back from ARSGetEntry. I notice that > ARSGetListEntry API do support sorting but the perl interface > ars_GetListEntry does not. I wonder whether this capability has > already incorporated to your perl extension before I go and try > to modify the code > > Thanks again. > > Wing Choy > AT&T > wh...@mi... ars_GetListEntry(ctrl,schema,qualifier,maxRetrieve,...) you can get sorting with ars_GetListEntry by specifying the fields to sort on after maxRetrieve and the sort order after each field. the sort orders in ar.h are 1 for ascending and 2 for descending. I really should add ascending and descending constants to the package. I've just never actually used this feature. for example, you could do: $all = ars_LoadQualifier($c,"User","1=1"); $login_name = ars_GetFieldByName($c,"User","Login Name"); @a = ars_GetListEntry($c, "User", $all, 0, $login_name, 1); to get a list of all users, sorted based on Login Name. -joel |