cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NathanFra
Helper II
Helper II

Create Coworker Recognition Board

Trying to create a rotating board that would recognize coworkers who went through a specific program.

 

Currently using a SharePoint list to build out the items. Would like to keep all users who went through the program to say on this list, but only pull a few at a time. My best idea would be to be a Yes/No column and only pull the ones that are true using a Filter within the app.

 

The way I have it at the moment works... but its somewhat wonky. I've created two identical screens with a Gallery per screen. I'm running a collection on the OnVisible of each screen:

NathanFra_0-1656513509181.png

I am also using a Timer control to go from one screen to the next.

 

This works, but with only showing 3-5 users at a time it will pull the same users repeatedly. Ideally I would like it to go down the list of users that are set to display instead of picking one at random. As well as keep everything on one screen with some controls that would allow the user to pause or go to the next recognized coworker.

 

As always, thanks for any insight!

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Super User
Super User

This is your gallery items 

Last(
        FirstN(
           SampleTable,waitinlineVar
              ))
              

 

this is your ontimerend

If(Or(waitinlineVar=CountRows(SampleTable),IsBlank(waitinlineVar)=true),Set(waitinlineVar,1),Set(waitinlineVar,waitinlineVar+1))
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

4 REPLIES 4
TheRobRush
Super User
Super User

You can actually do this all on one screen, fairly simply, and have it let's say return you 5 at a time. Allow me to demonstrate

 

Make a timer, and set its duration to whatever you would liek refresh rate to be, in my example i used 2000 for 2 seconds I then set its auto start restart and pause to on

 

and its ontimerend to (where sampletable is m y source)

ClearCollect(RandomGallery,
FirstN(
        Sort(

                AddColumns(
                            SampleTable,
                            "Randomvar",
                            Rand()),
                            
                            Randomvar,
                            
                            Ascending
            ),5
    )
);

Reset(Gallery2_2)

Make a Gallery, set its items to 

 

RandomGallery 

 

and you have a randomly refreshing list of tms from your source

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

@TheRobRush ,

 

Thank you for the help. I want to just pull one user at a time, so I would switch my FirstN(x,1). But is there a way to go down the list in an order without repeating users at random?

 

The goal is to try and show everyone an equal amount of times, instead of the same user showing up two times in a row.

TheRobRush
Super User
Super User

This is your gallery items 

Last(
        FirstN(
           SampleTable,waitinlineVar
              ))
              

 

this is your ontimerend

If(Or(waitinlineVar=CountRows(SampleTable),IsBlank(waitinlineVar)=true),Set(waitinlineVar,1),Set(waitinlineVar,waitinlineVar+1))
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
NathanFra
Helper II
Helper II

@TheRobRush 

 

That worked like a charm! Thank you!!!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,311)