ars_GetListEntry(ctrl,schema,qualifier,maxRetrieve,...)
entry_id
s
and description (query list) strings from the specified schema. The entries
are returned as an array of (entry_id, query-list) pairs.
If you wish to retrieve all entries in the schema (upto the maximum
allowed by the server or specified by you as the maxRetrieve
parameter) you should load a Qualifier with something
like (1 = 1)
.
Setting maxRetrieve = 0
will return as many matches as
the server will allow.
undef
.
Example:
%entries = ars_GetListEntry($c, "User", $q, 100); foreach $entry_id (sort keys %entries) { print "EntryID: $entry_id Short-Descrip: $entries{$entry_id}\n"; }
Example (2.x or 3.x) of how to set sorting options:
# returns entries for User schema sorted by login name $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);
Example (3.x only) of how to specify your own query list and sorting options:
$f = ars_GetFieldTable($ctrl, "User"); # retrieve list of matching records. query list should only # contain the Login name and Full Name fields. In addtion, # query list should be reverse sorted by Login name. @a = ars_GetListEntry($ctrl, "User", $qual, 0, # getListFields [ {columnWidth=>5, separator=>' ', fieldId=>$f{'Login name'} }, {columnWidth=>5, separator=>' ', fieldId=>$f{'Full Name'} } ], # sort Order $f{'Login name'}, 1);