cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HarishNayak
Helper I
Helper I

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,190)