web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Implement Voting logic...
Power Automate
Unanswered

Implement Voting logic in Power Automate

(0) ShareShare
ReportReport
Posted on by

I have following list in SharePoint:

NameEmailPlaceDateStatus
Janejane@zzz.comaaa4-AprPending
Peterpeter@zzz.comaaa4-AprPending
Nicknick@zzz.comaaa4-AprPending
Maggiemaggie@zzz.combbb8-AprPending
Aronaron@zzz.combbb8-AprPending
Sharonsharon@zzz.combbb8-AprPending
Chercher@zzz.comccc11-AprPending
Macmac@zzz.comccc11-AprPending

 

The aim is to use Power Automate to choose 2 records for each date and place (e.g. Place aaa on 4-Apr have 3 records but we have to randomly choose any two). After the choice have been made we will have to update the column Status to "Successful" and have it saved to the Sharepoint list.

 

I have tried many approaches but cannot seem to wrap my head around the correct approach that integrates all into a coherent solution. The approaches I have tried included:

1. Get random items from SharePoint list or arrays (https://365corner.pl/2021/09/03/get-random-items-with-power-automate/#ItemsSharePoint). This helps to randomly pick an item from an array of objects but I am not sure how to get the grouping by date and place into this in the first place.

2. Create grouping based on date and place (https://johnliu.net/blog/2018/6/do-group-by-in-flow-with-two-simple-elegant-loops). I managed to do this and get the output as separate groups (in html tables). 

 

Now I am lost on how I can proceed further to solve the above issue. I really hope to find help here. Thanks.

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,649 Super User 2026 Season 1 on at

    The process you link to in 1. has the potential to loop indefinitely if the random number generator does not cooperate.  I would instead do the following

     

    - get all items for a day

    - pick an item based on the random number generator

    - remove that item from the list

    - pick the second item based on the random number generator.

     

    That will introduce a bit of a Bayes flavor but will guarantee a deterministic outcome.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 639

#2
Valantis Profile Picture

Valantis 392

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard