How to group a randomized tile list

The landing page on my app is a randomized list of businesses that are paid my accounts.

I want to transition to a freemium model where unpaid accounts can be included in the list BUT at the bottom. (Much like when you see featured/sponsored businesses at the top of a website and then all the other businesses below that)

So I want it to show randomized paid listings above randomized unpaid listings

Glide does not allow multiple tile lists so i’m struggling to get the exact model

I was able to group them so that the paid listings are separated from the unpaid like so:

But because it’s randomized, sometimes the unpaid group is listed at the top.

Any advice here?

The easiest way would be to switch to a details screen, and then you can add two inline lists.

If you take that route, I’d suggest building it as a new tab and then switch it over once you have it all setup and working correctly.

1 Like

That’s what I was wondering, if I’d have to do that! I just recreated it and it works perfectly.

My only concern is if changing the structure of my first tab will change the pathway ‘name’ on the profiles. I have shareable branded profile links that are derived from the pathway of the first tab.

I haven’t done a lot with deep links, but I suspect that it might. Definitely worth testing/checking.

If you wanted to keep the list layout, there is another way. You could use something like the Roll Dice plugin to generate a random number for each account, multiply that by a large number (say 1000) for your unpaid accounts, and sort by that. The downside with that is that in order to get the order to change you’d need to use a seed value that included the time (probably RowID + current time), so the “randomisation” of the lists would be time based.

First way is much easier lol

Yes :slight_smile:

If you used RowID + DateTime to randomize, any idea how often the randomization would happen, or even what the trigger would be?

By default it would be 10 seconds. But you could adjust that upwards to any value that you wanted.

The way you would do that is to use a math column to derive an integer value from the current datetime that will change at your desired interval.

For example, if you wanted the list to randomise hourly, you could just do Hour(Now). Then combine that with the RowID to use as a seed value. The value of Hour(Now) will change once per hour, so the list will randomise once per hour. It would also repeat every 24 hours, but you could avoid that by including the year/month/day in the math calculation as well, eg:

Year(Now) * 1000000
+ Month(Now) * 10000
+ Day(Now) * 100
+ Hour(Now)

This is neat.

In the screenshot above, since I used MINUTE(now) as the time value, the template value “RowID-MINUTE(now)” will cycle back (be the same) every 60 minutes.

Are you saying that if the seed value of the roll-the-dice plugin column cycles back to the same value, then the output of roll-the-dice will be the same for sure every single time?

I haven’t actually tested it, but that’s what I’d expect. Perhaps you can confirm? :slightly_smiling_face:

And yes, it’s a useful trick. I’ve used a similar technique in Glide Pages to make an image change every X seconds.

1 Like

I just tested cyclical roll seed values for the Roll Dice column: 5 groups of seed values (25 seed values in total), 1000 sides, 3 dice rolls every few minutes.

Conclusion (which is not proof but perhaps proof enough): the same roll seed value generates the same output to the dice roll. As you expected @Darren_Murphy .