Collection Filter Element in Spring 22

Hello folks,

Let’s talk about the brand new collection filter element this week.

I wrote a newsletter issue about the get element before. Get elements are essential. They can query the Salesforce database and get multiple records for you. The corresponding functionality in coding is called SOQL. However, SOQL is much more powerful than the get element.

Get element and flow limitations can force the low-coder to build loops inside loops to process related records. When you are forced to build a solution like this, you should seriously consider whether flow is your best option.

When you loop within loops and start getting records, you run up against two limitations of flows:

  • You can only do up to 100 gets or SOQL’s in one synchronous transaction.
  • You can only process up to 2,000 elements in one flow interview.

This is where the new collection filter element comes to the rescue. For example, let’s say you need to get the cases for a specific contact under one account and show the case field values to the user. In the beginning, you can query all cases under the account. Then, you can show the user a few selection screens in your screen flow; finally, show the case field values and have the user edit them. Then, the user can go back to the contact selection screen and do it again for another contact. You can do all that using the new collection filter element without using another get element again after the first get execution.

Remember that your choice elements in your screen flows can accept collections as choices starting with Spring 22, as well.

But something even more impressive is offered with the new collection filter element. You can now use formulas to decide which records you select and add to your filtered collection.

You want to filter Account records with Annual-Revenue/Employee ratio within a specific range. Prior to this release, you had to create a formula field on the Object to show the Annual-Revenue/Employee calculation result. You don’t need to do that anymore. Instead, you can use a formula in your collection filter element to select records that have Annual-Revenue/Employee = $100,000, for example. This is huge.

If you don’t understand some of the concepts and the terms used in this newsletter issue, you may want to read get element issue here.

Recently published content:

My dear friend Daryl Moon and I had a live video chat o Flow Tips today on both LinkedIn and YouTube. Watch the YouTube recording here.


P.S. Originally published on 01/31/2022.

Read the previous issue of the newsletter here.

Read the next issue of the newsletter here.

Subscribe to the weekly educational Salesforce Flow Tips newsletter here.


2 thoughts on “Collection Filter Element in Spring 22

  1. Pingback: Top 6 Spring 22 Features – Salesforce Flow Tips Newsletter | Salesforce Break

  2. Pingback: Flow Orchestrator in Spring 22 – Salesforce Flow Tips Newsletter | Salesforce Break

Leave a Reply