I have the below salesforce flow:
What the flow is trying to do:
- On the first screen get the Account name and account number
- If Acc number = 1 then assign acc values to a record variable var_account1
3. For default outcome, I assign acc name&number to a record variable var_account2
-
create a default account variable with Name=Default and Number = 1111. I use the same var_account2 to store it
-
Loop through the list and store the merge field into a text list
The problem: My issue is when going through the flow, I don't see all the account Name displayed after the loop. This is especially when the case when I assign account where the account number is not equal to 1 and when a default account is created.
All I want is to loop through the list of accounts and display only the account Name. This is to give the user a summary that what Account has been added. Is there any other way to do this?
Debug Mode:
In above step default Account doesn't show up
Now Acc3 , that I added doesn't show up
Best Answer
Your usage of loop is the culprit. This is what your current Flow says
You've never actually waited for the end of your loop.
What you want is
You need to make your assignment in the loop closed and then add a connector from the Loop element to the screen element for
After Last Item
.Then, while you enter your information - it'll appropriately loop through the whole list (to assign your merge collection variable) before then going back to the screen.