Using a Flow to Source a Report
  • 20 Sep 2021
  • 2 Minutes to read
  • Dark
    Light

Using a Flow to Source a Report

  • Dark
    Light

Article Summary

Overview

The ability to use a Flow as a Data Source in a Report adds greater flexibility to the Report Designer. The Data Source Flow must be a synchronous Flow and must also output a Data Type List on the End step. This synchronous Flow operates on the backend to fetch data of a specified type, then the Flow Behavior allows it to be referenced in a Report as the Data Source. In the Data Source Flow, the data can come from multiple sources and be combined. When the Report appears at Runtime, the Flow executes and passes in the respective data.

Testing Large Reports
Using filters on large-scale Reports can severely impact performance. Please test those filters in a development environment to avoid end-user impact.

Example

This example contains a Flow using the Get All step to receive all of the Account data in the Decisions environment. This Flow Behavior will be changed so that the Report will recognize it as a working source of data. The Report will then be able to use data fields as columns based on the fetched data from the Flow.

  1. In a Designer Project, select CREATE FLOW on the top bar.
  2. Select the large Flow tile and provide a name, then select CREATE.
  3. In the Flow Designer, locate the SETTINGS section of the Properties.
  4. Expand the Behavior Type dropdown and choose Report Data Source Flow.
  5. In the Toolbox, navigate to INTEGRATION > INTERNAL SERVICES > ACCOUNTSERVICE and locate the Get All step, then move it to the workspace.
  6. Connect the steps in succession as shown below.

  7. Select the End step so that the Properties for it appear.
  8. Locate the DATA section and select SHOW EDITOR under the Output box.
  9. Enter Accounts for Name and search the Account type, then check the Is List box.
  10. Locate the INPUTS section, select Pick in the Accounts box and choose the Get All Output Results. This will send the output results out of the Flow, to be received by the Report.
  11. Save and close the Flow Designer once complete.

  12. Back in the Designer Project, select the CREATE REPORT button from the top.
  13. Choose the large Report tile and provide a name, then select CREATE.
  14. Select the Add button under the Data Sources section and expand Flow Reports, then choose Report Source Flow. This is now telling the Report to pull data from the Flow running on the back-end.
  15. Selecting the Add button in the Data Fields section will reveal that properties from the Account type are shown as if the data were being pulled in as a direct source.
  16. The Report will update in real-time as fields are added. 



Was this article helpful?