Showing results for 
Search instead for 
Did you mean: 
Advocate IV
Advocate IV

Creating multiple target list items based on values in the source list

I have a requirement for automatically creating multiple items in a target list, whereby the number of items to be created and their contents are driven by a source list, sort of transpose and expand.


Data in SourceQ1Q2Q3Q4
Result in Target    


In a nutshell, for each item in the source list, create as many items in the target list as specified in each column.

If column Q2 for item A is 2.5, I need 3 items in the target list, 2 with a value of 1 and the 3rd with a value of 0.5.

I figured out the innermost part by setting a variable, then a do until loop variable <= 0 with the output formula


and then decrement the variable by 1.


That works just fine, but now I need to assure that new items are only created for the item that was modified in the source list and triggered the flow. I applied an array filter after the Get items action, tried comparing both, Title and Title Id from  "when an item is created or modified"  with Title resp. Title Id from the Get items array, but to no avail, the workflow completes with no error but creates the new records for both, row A and row B in the source list, no matter which one I modify to trigger the flow.


Any suggestion? Thank you!


Advocate IV
Advocate IV

No way to get this to work, Apply for each affected all records from Get items.


Filter Array.png


Instead, added another condition within the Apply for each section:




So this does the trick just fine, but not very elegantly. What could be wrong with my Filter Array?


Community Support
Community Support

Hi @Beat,


Do you want to create new item within the target list for an existing item is modified within your Source list?

Could you please share a screenshot of your flow's configuration?


If you could provide more details about your scenario, we would provide a proper workaround for you.


Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes I want to create multiple items in the target list, based on data in source list items, but it's actually triggered when an item is changed in a third list which has a key to items in the source list.


So when an item in the triggering list is modified, the flow should make a collection of all matching entries in the source list and then create items in the target list. I figured out the workaround, using another condition within the Apply to each loop, but that's not very elegant, as it will cycle through all items in the source list skipping those that don't match the key from the triggering list.


Here the screenshots:


trigger and check if status is approved.png


If Status equals approved, get items from the Source list and filter the array for items where the title matches the key from the triggering list stored in thisPlanTitle:


get items and filter array.png


And that's where it fails. The subsequent Apply to each loop will act upon all items in the source list, not only those where the title matches the key from the triggering list.


Here the workaround: adding a condition within the apply to each section


condition 2.png


I then thought well, of course the Filter Array must be within the Apply to each section in order to work!


filter array within apply to each.png

But no, that makes of course no sense and didn't solve my issue. So I'm going to keep the Condition within the Apply to each cycle, as long as there are not hundreds or thousands of items it won't matter much, but still I would like to understand why Filter Array after Get Items is not filtering the items correctly.




Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (26,831)