---
schema_version: "1"
id: b841cc9913c8f68ffa5fdec371920e5b1cdab5b8f9df0df9ac6942ce276f7c51
title: RTRReportResult.Flatlist
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/Flatlist_class.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/Flatlist_class.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f49c37e58c8884f655780282fe8a83cb7082593d3161bb557ef71ed27da1201f
description: This class represents an RTR Report UI Flatlist component.
---
# RTRReportResult.Flatlist

This class represents an RTR Report UI Flatlist component.

The RTRReportResult.Flatlist class extends RTRReportResult.ReportComponent.

The supported modifiers are global and virtual.

## Namespace

cgcloud

## Supported Methods

<table class="featureTable sort_table" summary="">
          <caption><span class="tablecap">Table 1. RTRReportResult.Flatlist Supported Methods</span></caption>



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d34328e86">Method signature</th>

              <th class="featureTableHeader  " id="d34328e89">Description</th>

              <th class="featureTableHeader  " id="d34328e92">Version</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d34328e86" data-title="Method signature"><samp class="codeph nolang">FlatlistRowIterable getRows()</samp></td>

              <td class="entry" headers="d34328e89" data-title="Description">Returns an <samp class="codeph nolang">FlatlistRowIterable</samp> instance with all
                the Flatlist rows.</td>

              <td class="entry" headers="d34328e92" data-title="Version">60.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d34328e86" data-title="Method signature"><samp class="codeph nolang">FlatlistRowIterable getRows(String
                  rowTypeFilter)</samp></td>

              <td class="entry" headers="d34328e89" data-title="Description">Returns an <samp class="codeph nolang">FlatlistRowIterable</samp> instance with all
                the rows matching the specified row type filter. <p class="p"><span class="keyword parmname">rowTypeFilter</span>:
                  String. The available values for the row type filter can be extracted with the <samp class="codeph nolang">getRowTypes</samp> method. If a non-existent row type filter is
                  specified, the method throws an exception.</p>
              </td>

              <td class="entry" headers="d34328e92" data-title="Version">60.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d34328e86" data-title="Method signature"><samp class="codeph nolang">Set&lt;String&gt; getColumns()</samp></td>

              <td class="entry" headers="d34328e89" data-title="Description">Returns a set of all the available column names in the flat list. <p class="p">The dimension
                  attribute column values are returned in this format: <samp class="codeph nolang">&lt;Dimension Name.Report Field&gt;</samp>. For example, <samp class="codeph nolang">productdimension.id</samp>, <samp class="codeph nolang">promotiondimension.phase</samp>.</p>
                <p class="p">The KPI column values are returned with the KPI
                  names. For example, <samp class="codeph nolang">ProPlanIncrVolume</samp>.</p>

                <p class="p">Use these column names to request specific values for each row.</p>
              </td>

              <td class="entry" headers="d34328e92" data-title="Version">60.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d34328e86" data-title="Method signature"><samp class="codeph nolang">Set&lt;String&gt; getRowTypes()</samp></td>

              <td class="entry" headers="d34328e89" data-title="Description">Returns all the available row type filters present in the flat list. The wow type
                filters can be used to filter the dataset.</td>

              <td class="entry" headers="d34328e92" data-title="Version">60.0</td>

            </tr>

          </tbody>

        </table>

## Example Implementation

After the report is executed, extract the Flatlist data from the RTRReportResult object.

// Extract the Flatlist from the result
// - The component name must match its 'uimapping' name
// - The result must be casted to the correct type.
cgcloud.RTRReportResult.Flatlist flatlist = (cgcloud.RTRReportResult.Flatlist) reportResult.getComponent('FlatList');
    
// Retrieve the rows Iterable object
// All rows can be retrieved with the parameter-less "getRows"
cgcloud.RTRReportResult.FlatlistRowIterable iterator = flatlist.getRows('Promo-Product');

// Iterate over all the rows
while (iterator.hasNext()) {
    cgcloud.RTRReportResult.FlatlistRow row = iterator.next();
    
    // Extract column data. We assume the specified columns are in the report
    
    // Dimension information can be extracted with <dimension name>.<field>
    String promotionId = String.valueOf(row.getColumnValue('promotiondimension.id'));
    // KPI Value information can be extracted by querying the KPI Name
    Decimal kpiValue = (Decimal) row.getColumnValue('ProPlanIncrVolume');
    
    system.debug('Values: ' + promotionId + ' ' + kpiValue);
}