Group Maker - make random groups from a list of names


Just wondering if it’s possible to make random groups from a list of names? The user would set their desired group size (e.g. teams of 4) and a list of 24 names would be divided into 6 random teams of 4.

Had a crack using a series of randomised inline lists, each with the ‘limit items’ set to the number of names I wanted to show. Can easily create one random group of any number, however, the limit number can only be set in the builder. Also, could not work out how to stop groups accidentally containing names that already appear in other groups.

Tried to do it with maths columns as well. Was not sure how to deal with a list containing a number that is not divisible by the requested team size and how to get the app to create some groups of 4 and a group of remainders.

Has anyone done this before?

Is the number of teams fixed, or is that also variable?
If variable, would there be a limit to the number of teams?

I’m thinking you might be able to start by shuffling the names, and then chain a series of Slice Array columns together to fill the teams. But as you’d need one column for each team, you’d need to know in advance the maximum number of teams.

1 Like

Thank you

Slice Arrays are new territory for me so will definitely investigate.

In the meantime, a nearly satisfactory solution was very simple - copy an inline list 3 times and set their visibility with a choice column (1,2,3, or 4). If ‘3’ is selected the inline list with 3 tiles per row appears. Not perfect as the max number per group has to be 4 due to the limit of tiles per row (although the user can read downwards instead of across to make groups larger), and leftovers aren’t dealt with very well but this will actually do until I play around with slice arrays.


1 Like

Cool, good luck.
I haven’t actually tested that idea, but in theory I think it should work.
Give a shout if you need any help with it.


@Dan76 I had a quick play with that, you can actually do it with a single Slice Array column…

This is nice, because you could then feed your teams into an inline list.
Although I haven’t figured out yet how to shuffle the names. For some reason I was thinking there is an Array Shuffle plugin…


I just did the same thing this week with a bit of Python in Integromat. I take the list of IDs, shuffle them, slide them into chunks and write rows to the Sheet, only problem is the time to sync that back to Glide.


Tell your customer to buy an enterprise license, and then you can use the API :wink: :laughing:

1 Like

Haha I wish!

Resurrecting this thread as I’m currently in the process of converting a Classic app to a Glide app. In doing so I’ve realised that it’s no longer possible to use the method I’ve been using (as posted above) because Glide apps don’t let us set the number of tiles across a row. The functionality is the same - tap the collection and it reshuffles - but the number of items per row will change depending on what device the user has.

Wondering if there have been any changes since the original post that might help? @Darren_Murphy, is there a way to use the slice arrays and get them to shuffle as well?

In a quick test, ChatGPT did a great job of dividing a list of names into even groups so I added the Open AI integration and tried the ‘Ask a Question about a Table’ action. It only created 2 groups when I asked it for 4, and it only put out 5 names from a list of 22. I was just playing around and am new to using that integration but am wondering if it could work if it was set up correctly?

You could turn the collection horizontal

Or use a button block style tiles… can fit four wide on mobile

Hi Eric, thanks for the idea - yes, it will go to 4 wide on mobile, but how does the user enter the number of rows per team? If you set it to 4 on a desktop or iPad, it will show a different number of rows to a user on mobile

I’m having difficulty visualizing the the goal. Do you have a screenshot of how it worked on classic?

Here’s the team maker in Classic apps set to 4 teams. Looks the same on any device, including desktop, and remains consistent whether I set it to 2, 3 or 4 teams.


Here’s the result on Glide apps in mobile form:

And here’s the exact same format in desktop view. They are completely different. If I were to add a team number filter like I had for the Classic app, it would be inconsistent and simply wouldn’t work

In your classic example it’s four wide with 20 total names… can there be more than 20 names?

Yes, it shuffles the entire list - there could be 50 names, it doesn’t matter. If the number of names is not divisible by the number of teams selected the teams will be uneven but that’s unavoidable of course

ok thank you :pray: I think I’m starting to understand… that seems tricky… I’m gonna play around with it

I think we could use a custom collection here

1 Like

I took your suggestion about the custom collection and it works! I’ve never used a custom collection before but one thing it does is keep the number of items across the same in both mobile and desktop view. There are a couple of caveats - in grid view it only fills part of the screen, and some names don’t fit under the image so end up wrapping. Ideally, there’d be tiles with a name overlayed instead of the image, but that hasn’t been brought across from the classic apps yet.

Thank you!


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.