Show only the 3 photos with the highest number of votes received

Hi everyone,
I only have to show the 3 photos with the highest number of votes received.
I’ll try to explain: I have a google sheet with the photo id box then the photo box and the ratings box, I would like to show only the 3 photos with the highest ratings in the app.
I tried using a filter, it works, but if I have more than three top-rated photos, the app shows the other photos too.
How can I limit viewing to only 3 photos?
Thanks for the attention

vot

If you are displaying them in a Collection, then you can limit the Collection to only show 3 items.

thanks, I did as you instructed and it works, but if I have more than three photos with the same rating, how could I randomly rotate the other photos with the same or higher rating? so as to show the others too.
Thank you

Hi, I solved the problem with random, but how can I prevent it from showing me double photos?
I thank

What do you mean by “double photos”?

if I use the random function, I randomly pick up photos I have in the Google Sheet, it may happen that it shows 2 identical photos in my app, I don’t want this to happen.
I limited the display to only 3 photos and sometimes it shows the same photo at the same time 2 times

Thank you

There are so many different ways to do what you want to do, but which is the best depends on how your data is structured, and which components you are wanting to use to display the images.

Can you please add two screen shots:

  • firstly, one from the Glide Data Editor (not the Google Sheet) that shows how your images are stored
  • secondly, one from the Layout Editor that shows how you are currently displaying the images
1 Like

And why do you have identical photos though? I thought the images should be unique.