ars_GetListEntry(ctrl,schema,qualifier,maxRetrieve,...)

This function is used to retrieve the list of entry_ids and description strings from the specified schema. The entries are returned as an array of (entry_id, short-description) pairs. If you wish to retrieve all entries in the schema (upto the maximum allowed, or maxRetrieve) you should load a Qualifier with something like (1 = 1).

The "short-description" mentioned above is not the contents of the "short-description" field in the schema. It is a concatenation of a list of fields specified by the "Query List Fields" for this schema. See List_Entries.pl for an example.

An optional list of field ids and sorting type may be given after maxRetrieve to specify the sorting order. The sorting type can be 1 for ascending, or 2 for descending. Also, note that if you want to retain the order of the entry ids returned, then you must assign the list to an array, and not a hash.

Setting maxRetrieve = 0 will return as many matches as the server will allow.

On success
Returns a list of (entry_id, short-description) pairs.
On failure
Returns 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 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);
      

<-- Back to Table of Contents