Suppose we have two Microsoft SharePoint Lists, named Source List and Destination List. We aim to copy data from the Source List to the Destination List. Both lists feature a Person Column where multiple selections are permitted.
Power Automate (Flow)
Let’s go over the flow one action at a time.
Alright, in this demo, I use a manual trigger; however, the trigger you choose to use does not matter.
First up, we just need to grab all the items – or just the ones you want – from the Source List using a Get items action.
Apply to each – Source List Items
Now, in my demo, I have two list items in my Source List, so I need to loop through those items. To do this, add an Apply to each action and select value from the Get items action.
If you have only one SharePoint item that you want to copy, you can skip this step.
Select – Map Users I
We will now begin to loop through the users directly inside the Select action, essentially retrieving the information from each individual user. To do this, select the Users value from the dynamic content pop-up to set the From field of the Select action.
Do not use Users item; instead, use the value that corresponds directly to the name of your column. In my case, it’s just Users.
Select – Map Users II
Now comes the tricky part… we Map the User Claims value inside the Select action.
To do this, type Claims inside the first, left Map field and in the right field goes the magic. Click into the right field, then on Add dynamic content, then on Expression and insert the following code.
Click Update to close the pop-up.
We’re now ready to create or update the item in the Destination List. For this, add the respective action, in my case it’s a Create item action inside the Apply to each action and below the second Select action.
Now it’s very important that you click on the little “T” Icon at the top right of the person column field called Switch to input entire array.
This then allows us to input our Select array by selecting it (it’s usually called Output) from the dynamic content pop-up window.
Testing & Results
Alright, lets run the flow and see if it works…
All looks good, let’s take a look at the Destination List…
The items have been successfully copied from the Source List to the Destination List, and all users have also been transferred over 🤗