Rule Collection Filter Step
  • Updated on 12 Mar 2019
  • 3 minutes to read
  • Print
  • Dark
    Light

Rule Collection Filter Step

  • Print
  • Dark
    Light

This tutorial demonstrates how to use Rule Collection Filter Step . This step designer is able to create a custom Rule to filter collection of any type in Decisions .

Example

In this example we are going to use a Rule Collection Filter Step to filter a list of Accounts in Decisions .
We begin in the Designer Folder with selecting the FLOW button.
2018-01-12_110302-1024x688.png

In the resulting window,  name the Flow and click CREATE to proceed to the Flow Designer.
2018-01-12_110616-1024x614.png

In the Flow Designer we add a Get All step from Integrations > All Integrations > Internal Services > Account Service.
2018-01-12_111036.png

Then we add and connect a Rule Collection Filter Step, from All Steps [Catalog] > Data > List, to the Get All step in our Flow .
2018-01-12_111541.png

Next, we are going to set up a Rule Collection Filter Step. In the Inputs section of the Step settings we can check Expose Flow Data check-box if we would like to be able to use all Flow Data in ourFilter Rule . Then, with the Type picker we are going to use the All/Search category to select a type of the List that we are going to Filter with our custom Rule . In this case, it will be the Account type.
2018-01-12_113245.png

In the Input Collection setting we are going toSelect Value of the Get All Output in our Flow .
2018-01-12_113603.png

Then, with our Rule Collection Filter Step selected, we click Edit Rule to create our custom Rule Filter.
2018-01-12_114319-1024x276.png

First, expand Entity, select Email Address and select Next. Entity is the single Account from the Input list. This custom Rule will be evaluated against each Entity in the list and filter out all entities if the Rule outputs False.

Note
Entity is a single item from the Input Collection established within the flow.

2019-03-12_093352.PNG

In the resulting window we pick Contains verb and click Next .
2018-01-12_115317.png

Finally, as value for this condition we define Constant ‘admin’ . Click Done when finished.
2018-01-12_115548.png

Our Rule reads Entity.EmailAddress Contains admin , therefore the output from this step will be a list of Accounts which email addresses contain ‘admin’ . We can save and close Rule Designer.
2018-01-12_115831.png

Back in the Flow Designer we connectRule Collection Filter Step outcome to the End Step in our Flow . With End Step selected on the workspace we click Show Editor underData.
2018-01-12_121634-1024x359.png

In the resulting Data Definitions window we specify a data member of type String called AllEmailAddress . We then check Is List and Can Be Null . We can close this window.
2018-01-12_122518.png

Then, back on the Edit Step window, a new section called Inputs has appeared with All Email Address in it. We specify the Mapping Type as Select Value , and then click Pick. This will open up a Pick Data... window. Expand Rule Collection Filter Step Output and then select EmailAddress . Click Pick.
2018-01-12_122915.png

When finished Adding Data we close the Edit Step window.

This completes our Flow . We can click Debug Flow on the top panel of the Flow Designer.
2018-01-12_123033.png

Our Flow executes in the Debugger with no issues. If we check Rule Collection Filter Step Input Data we can see a list of all Accounts in Decisions .
2018-01-12_123435-1024x604.png

The Output from Rule Collection Filter Step is a list of filtered Accounts which email addresses contain ‘admin’ .
2018-01-12_124632-1024x603.png

Finally, our End Step outputs a list of Email Addresses from theFiltered List of Accounts.
2018-01-12_125050.png

Was this article helpful?