query (query): an optional query object containing paging and extra filters, created with a!query(). if no query is provided, the default paging from the report is used.
contextgroups (group array): one or more groups to pass to the report context.
contextprocessids (integer array): one or more process ids to pass to the report context.
contextprocessmodels (process model array): one or more process models to pass to the report context.
contextusers (user array): one or more users to pass to the report context.
The portalreportdatasubset object returned by this function contains both the unformatted result data and the process report's display configuration. The fields are as follows:
name (text): configured name of the process report.
description (text): configured description of the process report.
startindex (integer): index of the first returned result.
batchsize (integer): number of items requested.
sort (sortinfo array): sort configurations used.
totalcount (integer): number of total results.
columnconfigs (dictionary array): array of dictionaries, one for each column in the returned data. see the examples section below for an example of the array. each dictionary has the following fields:
label (text): column name configured in the process report.
field (text): unique column identifier used to access the column's data from row dictionaries and to specify a column in a sortinfo configuration.
drilldownfield (text): unique column drilldown identifier used to access the column's drilldown value from row dictionaries.
configuredformatting (text): formatting configured in the process report. this formatting can be interpreted or ignored as the designer chooses.
configureddrilldown (text): drilldown configured in the process report. the drilldown type can be interpreted or ignored as the designer chooses.
data (dictionary array): array of dictionaries, one for each returned row, containing the unformatted results of the report's column and drilldown expressions for that row. use the columnconfigs.field and columnconfigs.drilldownfield to get the keys to each column's data. see the examples section below for an example of this format.
identifiers (any type): array of unique row identifiers.
errormessage (text): the error message encountered executing the report, or null if no error occurred.
When a query is passed, the query's paginginfo overrides the report's configured sorting and paging. The first valid sortinfo object in the query paging field is used to sort the results; other sortinfo objects are ignored.
If the passed query object has a filter or logical expression, these are applied in addition to the filters configured on the process report. Columns cannot be selected or aggregated via the query parameter but can be configured in the process report.
If any of the context parameters are populated with objects, those objects are provided to the report as its context. At most one context parameter type may be used.
contextprocessmodels should be given using one or more constants of type process model.
If no users are passed to contextusers and the report expects a user context, the report is provided the context of the user evaluating the expression. If contextusers is populated, only that user or user array is used for the report context.
The user executing the function must be able to see the report configuration file. The report is executed using the same user security context that is running the expression.
Sorting on hidden columns is supported even though they are not returned.
Note: Since constants are specific to each system, these examples will not evaluate in your test rules interface. Use them only as a reference.
Get the first page of the all processes report by querying that report without providing any supplemental query configuration:
The following expression creates a dictionary array that is equivalent to the returned columnconfigs for the all processes report:
The following expression creates a dictionary array that is equivalent to two example data rows for the all processes report:
Get the first page of the all processes report, but override the default batch size of 25 with the larger value of 50 by passing a query with a paging configuration:
Get the processes for a process model by passing a process model to the context:
Get the tasks assigned to a specific user by passing a username to the context:
Get the expense approval tasks from a given region, greater than a given amount, and assigned to users in a given group by passing a group as context and a query with a logical expression: