I have never really used collection variables and loops in my flows before, so please excuse my limited understanding. I am trying to create a Visual Workflow that will allow my users to create purchase orders in batches (small batches, 5 - 15 records at a time).
The flow would start with a screen with two inputs:
# of Weeks Ordered: 4
Starting: 9/26/2016
This is where the formula comes in, as the 4 (from the input) values in my collection variable would be created by adding 7 to the start date (9/26/2016, 10/3/2016, 10/10/2016, 10/17/2016)
I was hoping I could then loop through the collection variable to create 4 Purchase_Order__c records each with the corresponding Start_Date__c.
Is this even remotely possible?
Thanks,
John
1 Antwort
John, what you want to do is have a Variable in the Flow get set to your repeating number (4) with a Screen. You also want a Date Variable. Then, in your loop, you will do your magic (update the date) with a plus 7 and subtract 1 from your number of weeks variable.
So, each go around the Loop, you will create the Record with the new date and subtract one from yoru counter. You want to exit the loop when you hit 0, so make sure you check for the counter at the beginning of the loop.