- 03 Jun 2021
- 2 Minutes to read
- Print
- DarkLight
Report Filter Change using a Flow Run Part
- Updated on 03 Jun 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
A Flow Run Part Page component allows a Flow to run within the section of space allotted for it on the Page. When the Page is accessed at runtime, the Flow will initiate from the Page tile. This can be used in tandem with Reports, where the Flow Run Part initiates a Flow that intakes user-defined filter criteria, then sends that to a Report to apply as a filter.
Example
This example has a Page that contains a Report Viewer component and a Flow Run Part component. The Flow Run part component will be built to initiate a Flow at runtime that gathers the filter string and sends it back to the Report Viewer component to use. The following example project can be downloaded and imported into a Decisions environment using the Importing and Exporting Overview article.
- Begin in a Designer Folder, in the bottom action panel select Manage > Page/Dashboard > Add Page Dashboard.
- In the Add Page/Dashboard dialog, provide a Page Name and select 'Create" under Page.
- In the Page Designer, add a Report Viewer to the bottom of the Page.
- With the Report Viewer selected in the Properties panel, under Default Report choose 'Create' to create a Report showing Accounts.
- In the Report Designer, add the Account Data Source as the Data Source and Email Address and Account Id as Data Fields.
- In the Filters column, select Email Address Contains. With the Filter selected navigate to the Properties panel.
- In the Runtime Behavior drop-down select Get Values From Other Reports.
- Check the Show all data when filter value empty option.
- Save and close the Report Designer.Please navigate to the Create a Report article for more information on creating a Report.
- In the Page Designer, add a Flow Run Part.
- With the Flow Run Part selected navigate to the Properties panel. Under Flow ID select 'Create'.
- Name the Flow and select Create.
- In the Flow Designer, add a Show Form step and select Create Form.
- Name the Form. This Form will simply contain a Text Box and a Label for the filter criteria, and two action Buttons to clear or search with the filter provided.Please navigate to the Create a Form article for more information on creating a Form. Additionally, this function is able to run by creating a Data Flow.
- Save and close the Form Designer.
- Back in the Flow Designer, on the Search outcome path add a Set Dashboard Report Parameters step in the Integrations > Reporting category from the Steps panel.
- Add a new Report Parameter. This parameter needs to have the same name as the filter on the Report, in this example, it is Email Address Contains.
- The input Email Address Contains will populate, choose Select From Flow as the mapping type and select the Form Output "Email Address".
- Under Inputs > Folder ID select Constant. This needs to be the Folder ID of the Folder that the Page lives in.
- In the Designer Folder, select the Folder created to house the Page.
- In the action menu select Manage > Get Folder ID, copy and paste this ID as the Constant under Folder ID.
- On the Clear Filter outcome path, add a Create Data step.
- Under Data To Create select Show Editor to add "Email Address:".
- Connect all outcome paths as shown below, notice the End step is not involved in this Flow.
- Save and close the Flow Designer then save and close the Page Designer.
- In the Designer Folder, select the Page view that was created during this example.
- The Flow Run Part and Report Viewer will display, type "@gmail.com" and select the Search button, notice how the report then filters showing only email addresses that contain "@gmail.com".
- When selecting the Clear Filter button the Report reverts to containing all the data.