This documentation supports the 9.1 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.



This function gathers statistical information about a set of data. The plug-in server calls this function when it receives a request from the BMC Remedy AR System server to get entry statistics.


If you do not define this function and the plug-in server receives a get entry statistics request, the BMC Remedy AR System server receives an error message and does not retrieve the data.


#include "ardbc.h"

int ARDBCGetEntryStatistics(
   void *object,
   char *tableName,
   ARVendorFieldList *vendorFieldList,
   ARInternalId transId,
   ARQualifierStruct *qualifier,
   ARFieldValueOrArithStruct *target,
   unsigned int statistic,
   ARInternalIdList *groupByList,
   ARStatisticsResultList *results,
   ARStatusList *status)

Input arguments


Pointer to the plug-in instance that the call to ARPluginCreateInstance returned.


Name of the external table from which to retrieve the statistics.


List of external form fields. The plug-in uses this list to map BMC Remedy AR System field identification numbers (field IDs) to corresponding external form field names.


All other ARDBC input arguments and return values see BMC Remedy AR System field IDs, not external form IDs.


Transaction identification number (transaction ID) that the plug-in server designates for each transaction. The transaction ID is unique to the thread that the BMC Remedy AR System server uses to access the ARDBC plug-in. There is only one open transaction per server thread.


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 operations (numeric data only).


Arithmetic operation that defines the statistic to compute. The statistic can include one or more fields and any combination of arithmetic operations. The system generates an error if the user does not have read permission for a field or if a field does not exist. If you specify AR_STAT_OP_COUNT for the statistic parameter, assign a tag value of 0 to omit this parameter.


Value that indicates the statistic type.


The total number of matching entries (AR_STAT_OP_COUNT).


The sum of values for each group (AR_STAT_OP_SUM).


The average value for each group (AR_STAT_OP_AVERAGE).


The minimum value for each group (AR_STAT_OP_MINIMUM).


The maximum value for each group (AR_STAT_OP_MAXIMUM).


List of zero or more fields to group the results by. The system computes a result for each group of entries having the same value in the specified field. Specifying more than one field creates groups within groups, each of which returns a separate statistic. Specify NULL for this parameter (or zero fields) to compute a single result for all matching entries.

Return values


List of zero or more results. If you specify one or more fields for the groupByList parameter, each item in the list represents a group. Each result structure contains the field values that define the group and the statistic for that group.


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.

See also


Was this page helpful? Yes No Submitting... Thank you