---
schema_version: "1"
id: 7fed35d47f75e3c1e7f0c9301747c4a05fb5c6634222aeca298c7d5674dc7200
title: RTRReportResult.FlatlistRowIterable
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/FlatListRowIterable_class.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/FlatListRowIterable_class.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c3af0f89aa1a57a4afcc98a26e08d91896972b9541aed66ad3fe24652ae879ed
description: This class represents a set of rows in an RTR Report UI Flatlist component.
---
# RTRReportResult.FlatlistRowIterable

This class represents a set of rows in an RTR Report UI Flatlist component.

The RTRReportResult.FlatlistRowIterable class implements the Iterator<FlatlistRow> interface. You can use this class in batch processes.

The supported modifiers are global and virtual.

## Namespace

cgcloud

## Supported Methods

Table 1. RTRReportResult.FlatlistRowIterable Supported Methods
| Method signature | Description | Version |
| --- | --- | --- |
| boolean hasNext() | Returns true if a record is retrievable. | 60.0 |
| FlatlistRow next() | Returns the next record in the dataset. If no more records are present, it throws an exception. | 60.0 |

## Example Implementation

// 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);
}