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

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,445)