cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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? 

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Shuffle Function with a timed exclusion

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))

Regards,

Mona

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.
Highlighted
Advocate I
Advocate I

Re: Shuffle Function with a timed exclusion

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

Highlighted
Advocate I
Advocate I

Re: Shuffle Function with a timed exclusion

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

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,918)