Hey Everyone,
Happy Saturday!
Jumping straight into today’s email…
Sometimes you want to be able to quickly count records in a flow.
Is there an easy way to do this?
Yes!
Check out the flow below:

We see it’s a record triggered flow that uses a Get element to find opportunities.
In order to use the counting method I’m about to describe, you’ll need to make sure your Get Records element is a collection by checking the right box (shown below).

Once that is set up, you can create a variable with the number data type.
I named this one OppCount, but you can call it anything you like.

With our variable created, we can then use an assignment operator to do the counting.
In our assignment, we’ll use the Equals Count operator to set our newly created variable to equal the count of records found by our Get Opportunities get record element.

That Equals Count operator is the key.
By using it to set the OppCount variable to be equal to the number of records found by your Get Records, you just quickly counted all the Opporunities!
Now we can reference the OppCount in our flow anywhere we need to use the count.
For example, we could create a decision based on the number of Opportunities we found.

And that’s a wrap.
I used to think we needed a loop to do this, but someone pointed out this faster counting method on my YouTube channel.
Awesome.
So, save this technique, it will definitely be useful to you eventually!
Best,
Nick
P.S. The commonly used Salesforce Inspector web extension received an upgrade recently (shout out to one of my clients for letting me know!)
The upgrade expands the functionality of the pop out window, improves the view of the “Show All Data” button, adds scroll bars to flows so you can navigate the UI with your mouse wheel, and makes writing queries cleaner.




You can download it at one of these links, based on your browser. Check it out!


