function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aidel BruckAidel Bruck 

How to filter a collection in a flow based on another collection

I have a collection of a custom object 'payments' that stores all the payments with a certain status. 
Then these payments are displayed in a datatable and users can select multiple payments. 
As a result I now have another collection with the selected record Ids. 
How can I get a third collection of only payments with Ids that do not appear in the selected collection without using multiple loops- I keep on hitting limits.
I tried creating an apex class but it seems like invocable methods cannot get and return lists.
John HillstromJohn Hillstrom
Winter 23 supports this using the IN operator. Use In and Not In Operators in Flows to Find Related Records ( (