Posts

Showing posts with the label collection filter

Salesforce Fact #921 | Figuring out duplicate account names in screen flow

Image
Suppose we need to find out the duplicate account names in the screen flow. We can get that using collection filter, transform elements. In this example, we have taken two account type collection: DefaultAccCollection(which stores all the account records) and DuplicateAccCollection(which stores the account whose names are duplicate). And at the end, we can use a transform element to extract the names from collection. Attached are the screenshots.

Salesforce Fact #633 | Flow: Check of target collection is empty after filter

Image
While using collection filters in flow, if we need to check whether the target collection after the filter is empty, isNull operator does not work. Because an empty target collection after the filter has the value as []. So, we can create a dummy blank collection filter.  In this example, we have a collection filter on a list of account records. Now, in order to check the target collection is empty or not we are comparing it with a dummy blank collection filter. Attached are the screenshots.