You need to sign in to do that
Don't have an account?
MrBrian
Fast lookup in flow for unique values only
Hi there,
I am struggling to create filter criteria a Fast Lookup element in a Visual Flow that I can use in a loop to create some new records.
- I have a custom field on QuoteLineItem called "Group__c" that users can be assigned numeric values to group line items.
- I would like my Visual Flow to loop through each "Group" value and create a "Build Asset" for each group number, where custom objects can be listed.
For example, a quote is created for Item 1 and Item 2. Item 1 consists of A, B and C, and Item 2 consistesns of C, D, and E. The quote is created for six line items, three of which are in group 1 and three are in group 2. My flow, when run, would create 2 "Build Assets" (one for each Group), and then will place A, B, C, C, D, and E into the correct build.
The issue I am having is I can't figure out how to make a list or a fast lookup where the Group__c must be unique. Eg. I need to be able to select one from each group, or create a loop where we say "for each unique group value, create an object". Can this be done with a Flow? Or am I basically looking a trigger to get this sort of filtering? Or, is there another workaround?
Thanks!
I am struggling to create filter criteria a Fast Lookup element in a Visual Flow that I can use in a loop to create some new records.
- I have a custom field on QuoteLineItem called "Group__c" that users can be assigned numeric values to group line items.
- I would like my Visual Flow to loop through each "Group" value and create a "Build Asset" for each group number, where custom objects can be listed.
For example, a quote is created for Item 1 and Item 2. Item 1 consists of A, B and C, and Item 2 consistesns of C, D, and E. The quote is created for six line items, three of which are in group 1 and three are in group 2. My flow, when run, would create 2 "Build Assets" (one for each Group), and then will place A, B, C, C, D, and E into the correct build.
The issue I am having is I can't figure out how to make a list or a fast lookup where the Group__c must be unique. Eg. I need to be able to select one from each group, or create a loop where we say "for each unique group value, create an object". Can this be done with a Flow? Or am I basically looking a trigger to get this sort of filtering? Or, is there another workaround?
Thanks!
I am facing the same problem here =/
Unable to get/filter only exclusive IDs from an object through my loops.
Here is the loop:
First, remove all values for the current variable in the loop:
Then, add the value:
I also have one last assignment that removes any null values in case there were some products without dates, but that will depend on your application. Hope this helps!
Thanks a lot for introducing me to the operator 'Remove All'. I really didn't know about it.
I had to make a few adjustments in the logic you provided to fit in my requirements, but it does work nicely.
Now, I am going to add a decision to check if the collection I am comparing is null at that moment or not. If it's, I'll skip the removing duplicate assignment. You know, just to optimize the flow a bit.
Again, thanks for your help. Have a good one.