Rule Collection Filter Step
  • 25 Oct 2021
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Rule Collection Filter Step

  • Dark
    Light

Article summary

Overview

The Rule Collection Filter Step allows for the Designer to create a custom Rule to filter collection of any type in Decisions. The Rule is applied to a collection of a defined type and any items that are triggered are filtered by the rule and returned.

Example

In this example, use the Rule Collection Filter Step to filter a list of Accounts.

  1. Begin in the Designer Folderby selecting CREATE FLOW.

    2019-06-26_1410.png

  2. In the resulting window, give the Flow a Nameand click CREATE to proceed to the Flow Designer.

    2019-06-26_1411.png

  3. In the Flow Designer, add a GetAll step from Integration > Internal Services > Account Service.

    2019-06-26_1412.png

  4. Then add and connect a Rule Collection Filter Step from All Steps [Catalog] > Data > List to the GetAll step in the Flow.

    2019-06-26_1413.png

  5. Next, set up a Rule Collection Filter Step. In the Inputs section of the Step settings, check the Expose Flow Data Check-Box to use all Flow Data in the Filter Rule. 
  6. Then, with the Type Picker, use the All/Search category to select a type in the List to filter with the custom Rule.
  7. In this case, it will be the Account type.

    2019-06-26_1415.png

  8. In the Input Collection setting, use the Select From Flow mapping type and select the GetAll_Output in the Flow.

    2019-06-26_1416.png

  9. Then, with the Rule Collection Filter Step selected, click Edit Rule to create the custom Rule Filter.

    2019-06-26_1418.png

  10. Define the If as Entity.EmailAddress Contains admin.
    Note
    Entity is a single item from the Input Collection established within the Flow.

    2019-06-26_1423 PART1.png

    2019-06-26_1424.png

    2019-10-29_16h35_19.png

  11. Finally, as the value for this condition, define the Constant as admin
  12. Click Done when finished.

    2019-06-26_1431.png

  13. The Rule reads Entity.EmailAddress Contains admin, therefore the output from this step will be a list of Accounts in which the email addresses contain ‘admin’. 
  14. Save and Close the Rule Designer.

    2019-06-26_1432.png

  15. Back in the Flow Designer, connect the Rule Collection Filter Step outcome to the End Step in the Flow. 
  16. With the End Step selected on the workspace, click Show Editor under data

    2019-06-26_1433.png

  17. In the resulting Data Definitions window, specify a data member of the type String called AllEmailAddress
  18. Then check Is List and Can Be Null
  19. Save and close this window.

    2019-06-26_1434.png

  20. Back on the Edit Step window, a new section called Inputs has appeared with All Email Address in it. 
  21. Specify the Mapping Type as Select From Flow and then click Pick. 
  22. Expand the Rule Collection Filter Step Output and then select EmailAddress. Click DONE.

    2019-06-26_1435 PART 1.png

    2019-06-26_1436.png

  23. When finished Adding Data, close the Edit Step window.
  24. This completes the Flow. 

Debug

  1. From the Flow Designer, select Debug from the top action bar.
  2. Debug the Flow using the FULL button.

    2019-06-26_1437.png

  3. The Flow executes in the Debugger with no issues. Checking the Rule Collection Filter Step Show Step Info shows a list of all Accounts.

    2019-06-26_1438.png

  4. The Output from the Rule Collection Filter Step is a list of filtered Accounts for email addresses that contain admin.

    2019-06-26_1440.png

  5. Finally, the End Step outputs a list of Email Addresses from the Filtered List of Accounts.

    2019-06-26_1441.png


Was this article helpful?