Create list in for loop

0
I have created a for loop which retrieves data from data base and created a list of same object. Now whenever run that microflow the list I get is empty. and the object contains last entry. I want to add the object retrieved to the list and at the end I need populated list. So which activity shall I put in the third position.
asked
3 answers
1

this is the screenshot

answered
1

Hey there, you need to have the following steps:

  • Create list action
  • Start iterator
    • Retrieve list
    • Add to list

Because you had the create within the iterator, the list is re-created every iteration and you end up with a list that consists of only the last retrieved CourseList_2

answered
0

All the steps can be done in single step only as below in the retrieve action

 

 

answered