Rule Filter On ReportLast Updated: 07/18/2016 Introduced in Verision: 3.0 |
This tutorial demonstrates how to use Rule Filter on Report.
Example:
In this example we are going to create a Report of Accounts that will be filtered matching Current user email domain. To achieve this we will need to use Rule Filter on the Report that will be evaluating Current User Email Address.
We begin in the Designer Folder with clicking Create Report/Page > Create Report on the Folder Actions Panel.
Then, we Name Report and click Create to proceed to the Report Designer.
In the Report Designer we add Account Data Source from the Data Sources > Common category.
Then, we add Email Address and Created on Date fields to populate our Report with some data. We can see that our Report contains Accounts from two domains: decisions.com and mycompany.com. Save the Report and close Report Designer.
Back in the Designer Folder we are going to create a helper Flow for our future Rule. Click Create Flow on the Folder Actions Panel.
Then, we Name the Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we select Start Step and Add New Current Email Address Flow Input.
Next, in the Flow Settings we select Converter Flow Behavior Type.
Then, we add Split String Step from All Steps [Catalog] > Data > Text category.
Connect Done outcome from the Split String to the End Step, and select Split String step on the workspace to map data. As separator field we use Constant ‘@’. For the source Input we Select Value of CurrentEmailAddress Flow Input.
Finally, we select End Step on the workspace and Add Last Value from the Split_String_Output collection as Flow Output.
This completes our helper Flow. We can save the Flow and close Flow Designer.
Back in the Designer Folder we are going to create a Rule that we will be using as a Filter on our Accounts Report. Click Create Rule > Create Rule on the Folder Actions Panel.
In the resulting window we Name the Rule and click Create to proceed to the Rule Designer.
In the Rule Designer we click Add New to add Rule Input Data.
In the Add Rule Input Data we define Name and String type. Click Ok to save and continue.
Then, we click Add New Rule Step.
In the resulting window we pick our Rule Input and click Next.
Then, we pick Contains verb from the Text Rules category and click Next.
Finally, for the value we are using Run Converter Flow and pick our helper Flow as Converter.
Then, for CurrentEmailAddress input to the Converter Flow we Select Value of InitiatingUserEmail from Flow Data and click Done.
This completes our Rule Design. We can save the Rule and close Rule Designer.
Back in the Designer Folder we locate our Accounts Report and Edit it.
In the Report Designer we Add Rule Filter.
In the resulting window we pick our Report Rule Filter using Rule picker.
Then, we Edit EmailAddress Rule Input.
And, set it to be email_address Report field. Then click Ok.
Save the Rule Information window by clicking Ok.
We should be able to see that our Report filters out non decisions.com Accounts because we are logged in as admin@decisions.com.
Then, we logout and log back in as admin@mycompany.com.
Locate and run Accounts Report…
Report filters out non mycompany.com Accounts respecting Current Logged In Account.