Rule Filter On Report

Last 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.

createReport

Then, we Name Report and click Create to proceed to the Report Designer.

nameReport

In the Report Designer we add Account Data Source from the Data Sources > Common category.

addAccountDataSource

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.

columnsAdded

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.

createFlow

Then, we Name the Flow and click Create to proceed to the Flow Designer.

nameFlow

In the Flow Designer we select Start Step and Add New Current Email Address Flow Input.

addFlowInput

Next, in the Flow Settings we select Converter Flow Behavior Type.

behaviorConverter

Then, we add Split String Step from All Steps [Catalog] > Data > Text category.

addSplitString

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.

mappingForSplitString

Finally, we select End Step on the workspace and Add Last Value from the Split_String_Output collection as Flow Output.

addFlowOutput

This completes our helper Flow. We can save the Flow and close Flow Designer.

flowIsCompleted

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.

createRule

In the resulting window we Name the Rule and click Create to proceed to the Rule Designer.

nameRule

In the Rule Designer we click Add New to add Rule Input Data.

addRuleInput

In the Add Rule Input Data we define Name and String type. Click Ok to save and continue.

nameRuleInput

Then, we click Add New Rule Step.

addNewRuleStep

In the resulting window we pick our Rule Input and click Next.

pickEmailAddress

Then, we pick Contains verb from the Text Rules category and click Next.

pickVerbForRule

Finally, for the value we are using Run Converter Flow and pick our helper Flow as Converter.

pickConverterForRule

Then, for CurrentEmailAddress input to the Converter Flow we Select Value of InitiatingUserEmail from Flow Data and click Done.

selectCurrentEmail

This completes our Rule Design. We can save the Rule and close Rule Designer.

ruleCompleted

Back in the Designer Folder we locate our Accounts Report and Edit it.

editReport

In the Report Designer we Add Rule Filter.

addRuleFilter

In the resulting window we pick our Report Rule Filter using Rule picker.

pickRule

Then, we Edit EmailAddress Rule Input.

editRuleInput

And, set it to be email_address Report field. Then click Ok.

pickReportFieldInput

Save the Rule Information window by clicking Ok.

reportFilterRuleUpdated

We should be able to see that our Report filters out non decisions.com Accounts because we are logged in as admin@decisions.com.

decisionsEmailsFiltered

Then, we logout and log back in as admin@mycompany.com.

mycompanyLogin

Locate and run Accounts Report

runReportMyCompany

Report filters out non mycompany.com Accounts respecting Current Logged In Account.

reportRunningMyCompany

 

Additional Resources