Skip to main content
Skip table of contents

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

Methods

containsDetails()

Resolves into a Boolean telling whether this Report data includes details rows (true) or not (false).

For example, the expression ${!reportData.containsDetails()} resolves into true if the report data doesn't contain detail row information.  

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 ${reportData.getReportType() == 'TABULAR'} would work.

Using the shorthand form, the expression becomes ${reportData.reportType == 'TABULAR'}.

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 ${tot.aggregates["Sum of Amount"].value} would work. 

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 ${grouping.children} given to looping commands are necessary.

definition

A Report Data - Grouping Definition value containing details of this grouping.

For example, with "gr1" holding a Group Container value, the expression ${gr1.definition.level} would resolve into a Number telling the level of the grouping.

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 ${gr2.label} would resolve into that grouping's label. 

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 ${gr1.original} would resolve into the ID of the User record representing the Owner.  

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 ${gr1.preformatted} would resolve into the name of the Owner.  

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 ${gr2.value} would resolve into a Date value representing the Close date.  

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 ${det['Opportunity Name'].value} would resolve into the Opportunity's name, as would the expression ${det['OPPORTUNITY_NAME'].value} due to both labels and API names functioning as keys.

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 ${detailColVal.original} would resolve into a number-like String with the sum, such as "1319869.0".  

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 ${detailColVal.preformatted} would resolve into a currency-like presentation of the value, such as "EUR 1 319 860,00".  

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 ${detailColVal.value} would resolve into a Currency value of 1319860.  

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 ${sum.original} would resolve into a number-like String with the sum such as "1319869.0".  

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 ${sum.preformatted} would resolve into a currency-like presentation of the sum, such as "EUR 1 319 860,00".  

type

A String that is the type of the aggregate, telling how the value is calculated. The value can be one of the following:

  • AVG - Average

  • MAX - Maximum

  • MIN - Minimum

  • SUM - Sum

  • CUSTOM - A non-standard aggregate. Typically, indicates that the aggregate's value is calculated with a custom formula.

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 ${sum.value} would resolve into a Currency value of 1319860.  

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.