ARGetListEntryWithFields
Privileges
The system returns information based on the access privileges of the user that you specify for the control parameter. All lists, therefore, are limited to entries the user can access (users must have permission for the entryId field to access and retrieve entries).
Synopsis
#include "arerrno.h"
#include "arextern.h"
#include "arstruct.h"
int ARGetListEntryWithFields(
ARControlStruct *control,
ARNameType schema,
ARQualifierStruct *qualifier,
AREntryListFieldList *getListFields,
ARSortList *sortList,
unsigned int firstRetrieve,
unsigned int maxRetrieve,
ARBoolean useLocale,
AREntryListFieldValueList *entryList,
unsigned int *numMatches,
ARStatusList *status)
Input arguments
control
The control record for the operation. It contains information about the user requesting the operation, where that operation is to be performed, and which session is used to perform it. The user and server fields are required.
schema
The name of the form to retrieve entries for.
qualifier
A query that determines the set of entries to retrieve. The qualification can include one or more fields and any combination of conditional, relational, and arithmetic (numeric data types only) operations. The system generates an error if the user does not have read permission for a field or if a field does not exist.
Specify NULL or assign an operation value of 0 (AR_COND_OP_NONE) to match all form entries.
getListFields
A list of zero or more fields to be retrieved with each entry. The system checks the permissions for each specified field and returns only those fields for which you have read access.
sortList
A list of zero or more fields that identifies the entry sort order. The system generates an error if you do not have read access on all specified fields.
Specify NULL for this parameter (or zero fields) to use the default sort order for the form (see ARCreateSchema). The system sorts the entries in ascending order by entryId if the form has no default sort order.
firstRetrieve
The first entry to retrieve. A value of 0 (AR_START_WITH_FIRST_ENTRY) represents the first entry. A value of 1 will skip the first entry.
useLocale
A flag that indicates whether to search for entries based on the locale.
If you specify 1 (TRUE) and the Localize Server option is selected, entries are searched using the locale specified in AR_RESERV_LOCALE_LOCALIZED_SCHEMA. If no matches are found for the specified locale, the search becomes less restrictive until a match is found.
If you specify 0 (FALSE) or the Localize Server option is cleared, all entries are searched. For more information, see Localizing-the-server.
maxRetrieve
The maximum number of entries to retrieve. Use this parameter to limit the amount of data returned if the qualification does not sufficiently narrow the list.
Specify 0 (AR_NO_MAX_LIST_RETRIEVE) to assign no maximum.
Return values
entryList
A list of zero or more (accessible) entries that match the criteria defined by the qualifier parameter. The system returns a list with zero items if no entries match the specified criteria.
numMatches
The total number of (accessible) entries that match the qualification criteria. This value does not represent the number of entries returned unless the number of matching entries is less than or equal to the maxRetrieve value.
Specify NULL for this parameter if you do not want to retrieve this value.
status
A list of zero or more notes, warnings, or errors generated from a call to this function. For a description of all possible values, see Error-checking.