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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,440)