Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Shuffle Function with a timed exclusion

Hi, I`m part way through designing and app that uses the shuffle function to choose a random item from a sharepoint list containing factories. It then chooses up to 6 workers from that factory. This part works absolutely fine but I couldnt find anything online to give me help on making sure the previously chosen factory can`t be selected for a set time period.


Can anyone give me some guidance? 

Community Support
Community Support

Hi @RedAl,


First of all, please understand that Shuffle returns a table that has the same columns and number of rows as the argument. So I'm not sure what do you mean by "choose a random item from a sharepoint list containing factories." Please explain this part maybe with the related formula. 


About your requirement, I think it is that you want to filter the SharePoint list with a set time period. I assume that you have one date column in this SharePoint list and want to filter base on this column. Let's call it "Date" for example. You can insert 2 date picker controls to select the date range. DatePicker1 and DatePicker2 are the date picker controls' names. Then you could set a formula like below to get what you want:

Shuffle(Filter(ListName, Date>DatePicker1.SelectedDate,Date<DatePicker2.SelectedDate))



Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, sorry, I didnt explain the setup well. I`m using the shuffle function to shuffle the list of factories taken from the Sharepoint List then going with the Factory at the top of the list. It then applies the same logic for the top 6 factory workers. Then I have the "send email" button that mails the six chosen workers and also outputs the factory, workers etc into a second sharepoint list which does have a date column. Am I right in thinking I can use that output sharepoint list with the datepicker command?

Thanks Mona

Hi, further to my previous message. The original sharepoint list has no date column. As this sharepoint list is going to be automatically overwritten daily with updated source data I can`t automate the addition of a date column. I wondered if it was possible to add a date column to my collection but am struggling to find anything online for this exact query. Is it even possible?

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,468)