Report Data
A Report data value contains data of a single run of a specific Salesforce report. These values are only produced by the loadReportcommand.
Similar to Map, the contents of a Report data value can be accessed with specific keys. However, the depth of the contents is immense compared to the internal structure of most other value types due to the report being described in great detail. Therefore, it is generally not practical to access the contents straight from a Report data value, but instead give the value to a command that helps with its use, such as report-table in HTML templates. However, even with the help of these commands it is necessary to know some ways to refer to the data within, and therefore documentation of the different Report data value subtypes is included below.
Related commands
loadReport
The producer of Report data values.
Methods
containsDetails() | Resolves into a Boolean telling whether this Report data includes details rows (true) or not (false). For example, the expression |
getReportType() | Resolves into a String telling report's type, so either "TABULAR" or "SUMMARY" (as Matrix type data cannot be generated). For example, to check if the Report data was for a tabular report, the expression Using the shorthand form, the expression becomes |
Report Data - Group Container
A container for Grouping data within the report. Data of each Grouping row and the Total row are represented by this value. The commonly useful data entries within are "label", "preformatted" and "value", which provide the grouping's label and value, suitable to be displayed on a document. An expression like ${gr1.label}: ${gr1.preformatted}
, with "gr1" being a value of this kind, could resolve into something like "Opportunity Owner: Millie Dynamoweaver".
Data entries
Key | Value |
---|---|
aggregates | A Map of all the aggregate values for this grouping. Keys in the Map are aggregate names, e.g. "Sum of Amount" and "RowCount", with the values being Report Data - Aggregate Container values. For example, to display the value of "Sum of Amount" of the report's total row, represented by the "tot" variable, the expression |
children | A Collection of all the report rows one level below this grouping. The Collection may therefore contain either Report Data - Group Container values or Report Data - Detail Container values, the latter being the case if this value represents the lowest grouping level of the report. It is this data entry that allows access deeper into report data, from the groupings to the detail rows. This data entry is typically handled internally by the ReportData-using commands, and therefore not needed in any expressions with them. However, if you wish to manually explore the depths of the report, expressions like |
definition | A Report Data - Grouping Definition value containing details of this grouping. For example, with "gr1" holding a Group Container value, the expression |
label | A String that is the label of the grouping, typically the label of the field the grouping is done by. For example, with "gr2" holding a Group Container value, the expression |
original | A String that is the original, raw format of the value of this grouping, as provided by Salesforce. This value may not be particularly suited for presentation purposes. For example, if "gr1" holds a Group Container value of a grouping by record Owners, the expression |
preformatted | A String that is the value of this grouping in a presentable format, as provided by Salesforce. It is recommended to use either this or "value" to display the grouping's value. For example, if "gr1" holds a Group Container value of a grouping by record Owners, the expression |
value | A value that has been produced by Dynamo out of the "original" value. The type of this value generally depends on the type of the field the grouping is done by, so a Currency-type field would make this value of the Currency type. It is recommended to use either this or "preformatted" to display the grouping's value. For example, if "gr2" holds a Group Container value of a grouping by Close date, the expression |
Report Data - Detail Container
A container of Detail row data within the report. As a detail row represents a single record, this container provides access to that record's field values included in the report. Expressions like detailRow.contents['Account Name'].preformatted
and detailRow.contents['Amount'].value
are examples of how to get the detail data.
Data entries
Key | Value |
---|---|
contents | A Map containing the values of this detail row. Keys are the Labels of the report columns and the Report's API names of the fields, with values being of the Report Data - Value Container type. As this is the only data entry within this value type, commands aiding with the use of ReportData values typically provide direct access to this entry instead of the Value Container value itself. For example, if the report is of Opportunities and the field "Name" is included in the report and "det" is this data entry's value, an expression like |
Report Data - Value Container
A container of a detail row's column/field value. Presents the value in three different forms.
Data entries
Key | Value |
---|---|
original | A String that is the original, raw format of the value, as provided by Salesforce. This value may not be particularly suited for presentation purposes. For example, for a value of a currency-type field, an expression like |
preformatted | A String that is the value in a presentable format, as provided by Salesforce. It is recommended to use either this or "value" to display the value. For example, for a value of a currency-type field, an expression like |
value | A value that has been produced by Dynamo out of the "original" value. The type of this value generally depends on the type of the field the value is from, so a Currency-type field would make this value of the Currency type. It is recommended to use either this or "preformatted" to display the value. For example, for a value of a currency-type field, an expression like |
Report Data - Aggregate Container
A container of Aggregate values for a grouping or the total row. Aggregates are the sum, maximum, minimum and average values present in those rows, and also any custom formulas summarizing values of the detail rows.
Data entries
Key | Value |
---|---|
original | A String that is the original, raw format of the value of this aggregate, as provided by Salesforce. This value may not be particularly suited for presentation purposes. For example, for an aggregate which is a sum of currency-type field values, an expression like |
preformatted | A String that is the value of this aggregate in a presentable format, as provided by Salesforce. It is recommended to use either this or "value" to display the aggregate's value. For example, for an aggregate which is a sum of currency-type field values, an expression like |
type | A String that is the type of the aggregate, telling how the value is calculated. The value can be one of the following:
|
value | A value that has been produced by Dynamo out of the "original" value. The type of this value generally depends on the type of the field the aggregate aggregates, so a Currency-type field would make this value of the Currency type. It is recommended to use either this or "preformatted" to display the aggregate's value. For example, for an aggregate which is a sum of currency-type field values, an expression like |