Merge lists
In Power Automate Desktop, a variable that can hold multiple values is called a “list”.
This article explains how to merge multiple lists and get the merged list.
To learn how to create a list, see this page.
Implement by copying and pasting
Section titled “Implement by copying and pasting”Copy the following code and paste it into the Power Automate Desktop flow designer to add the actions.
Variables.CreateNewList List=> ListVariables.AddItemToList Item: 1 List: List NewList=> ListVariables.AddItemToList Item: 2 List: List NewList=> ListVariables.AddItemToList Item: 3 List: List NewList=> ListVariables.CreateNewList List=> List2Variables.AddItemToList Item: 4 List: List2 NewList=> List2Variables.AddItemToList Item: 5 List: List2 NewList=> List2Variables.AddItemToList Item: 6 List: List2 NewList=> List2Variables.MergeLists FirstList: List SecondList: List2 OutputList=> OutputListImplement in Power Automate Desktop
Section titled “Implement in Power Automate Desktop”- In “Search actions”, type “Merge lists”.
- Select the two lists you want to merge. The merged list contains the items of the first list followed by the items of the second list, so the order in which you select them determines the order of the items in the merged list. The two original lists aren’t changed.
Possible errors
Section titled “Possible errors”If the two lists you merge are of incompatible types, the error “The lists supplied are of incompatible types” occurs.