The RTRReportResult.FlatList class is used to access Flatlist information from RTR reports.
Example
Here’s an example of how to extract the Flatlist data from the RTRReportResult object.
1// Extract the Flatlist from the result2// - The component name must match its 'uimapping' name3// - The result must be casted to the correct type.4cgcloud.RTRReportResult.Flatlist flatlist = (cgcloud.RTRReportResult.Flatlist)5 reportResult.getComponent('FlatList');67// Retrieve the rows Iterable object8// All rows can be retrieved with the parameter-less "getRows"9cgcloud.RTRReportResult.FlatlistRowIterable iterator = flatlist.getRows('Promo-Product');1011// Iterate over all the rows12while(iterator.hasNext()){13 cgcloud.RTRReportResult.FlatlistRow row = iterator.next();1415 // Extract column data. We assume the specified columns are in the report1617 // Dimension information can be extracted with <dimension name>.<field>18 String promotionId = String.valueOf(row.getColumnValue('promotiondimension.id'));19 // KPI Value information can be extracted by querying the KPI Name20 Decimal kpiValue = (Decimal)row.getColumnValue('ProPlanIncrVolume');2122 system.debug('Values: ' + promotionId + ' ' + kpiValue);23}
Returns an instance of a FlatlistRowIterable object with all the rows that match the specified row type filter. The available values for the row type filter can be extracted with the getRowTypes method.
Returns an instance of a FlatlistRowIterable object with all the rows that match the specified row type filter. The available values for the row type filter can be extracted with the getRowTypes method.
Returns a set that includes all the available column names in the Flatlist.
The method returns the following:
Dimension attributes—Include the name of the dimension and a report field separated by a dot. For example, productdimension.id, promotiondimension.id, and promotiondimension.phase.
KPI columns—Include the KPI name. For example, ProPlanIncrVolume.
Signature
static RTRReportResult.FlatList getColumns()
Return Value
Type:Set<String>
getRowTypes()
Returns all the available row type filters present in the Flatlist. The row type filters can be used to filter the dataset.