cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HarishNayak
Frequent Visitor

Update people picker field (multi person) from another list randomly

Hi All,

 

I have 2 list.

 

List 1 has all the items created by the user 

List 2 has list of unique email address

 

My Requirement is to populate 3 email address from List 2 into the List 1 people finder field for each item. So basically all the emails in List 2 should be evenly distributed among all items in List 1 in pair of 3. I know it may depend on the number of emails in List 2. So even if we could closely assign equal number of items to each emails that should be ok.

 

Since there is not relation between List 1 & List 2 i am not sure how this can be done in Power Automate

1 REPLY 1
WillPage
Impactful Individual
Impactful Individual

You can randomly select an item from an array like

 

variables('MyArray')[rand(0,sub(length(variables('MyArray'),1))]

 

So, that being the case, get all the items from list 2, distill it down to a plain array of email addresses using a Select action where what you're selecting is simply item()?['Title'] (press the little button to break out of key-value mode) assuming all the email addresses are in the Title column of a SP list.

Now you can set an Until loop with a timeout of 3 iterations to build up a JSON object that represents the multi-person column then update the item with that.

Helpful resources

Announcements
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 (61,177)