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
DbjensenDbjensen 

Flow Builder: List A does not contain record in List B (How To)

Hello - I am using flow builder to update a checkbox on an object called Policies__c. The scenario and question is below. Any help would be greatly appreciated. 

1. Get Policies__c WHERE Policies_Started_Today__c = true
Returned records: (List 1)
PCID = A
PCID = B
PCID = C
(PCID is a custom text fiield)

I do a second query: 

2. Get Policies__c WHERE Policies_Started_Today__c = false AND PCID IN List 1
Returned records:
PCID = A
PCID = B

I need to get the record = C and check a box on that record. How can I do this using Flow? 

Thanks for any help you can provide. 

 
DbjensenDbjensen
I figured it out. Here are the details if anyone else needs to build this scenario. 

1. Query records 
2. Create loop
3. Create text collection variable and assign it to the text  variable from loop
4. Do steps 1-3 again for the second set of records and use IN operator to find matching records from the first list
5. Now do one last query following steps 1-3. However, this time use the operator NOT IN to find the records from list 1 that are not in list 2

Hope this helps.