# Possible to click and display random item from a list?

**URL:** <https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835>\
**Category:** Ask for Help\
**Created:** [January 28, 2022, 5:56pm UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835 "2022-01-28T17:56:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hammock](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hammock/32/38199_2.png) [@hammock](https://community.glideapps.com/u/hammock)\
**Post date:** [January 28, 2022, 5:56pm UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/1 "2022-01-28T17:56:45Z")

</div>

I am putting together an app that features a list of Spanish verbs that require use of a preposition, and on click showing the correct preposition to use. I’ve got it set up by its default method, ie. showing a list of all the verbs, then on click displaying the appropriate preposition. But I’d like to add a tab wherein a user would click a button to see a random word from the list, then click the button again (or click a second button) to see the appropriate preposition. That way they can test themselves on random selections from the list, as well as going through the list item by item.

I haven’t yet seen any way to use randomization with a component, but I’ve only been working with Glade for an hour or two. Is there such functionality? Thanks for any suggestions!

hm

PS: I’m using a Google Sheet for the data, in case that helps. I’ve considered whether I might create the random function in the underlying data sheet…

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 29, 2022, 12:22am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/2 "2022-01-29T00:22:17Z")

</div>

First up, welcome to the community! We hope you will enjoy your time here.

For your question, I crafted a quick app for you.

> **[Randomness](https://elastic-berry-6461.glideapp.io/)**

Let me know if it works.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 29, 2022, 12:44am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/3 "2022-01-29T00:44:25Z")

</div>

Here’s a PDF walking you through each step I did.

> **[Randomness workflow.pdf](https://drive.google.com/file/d/1rqIQvfvkZcMiX3HoP0zJmVH75hBTQm4T/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 29, 2022, 2:53am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/4 "2022-01-29T02:53:40Z")

</div>

[Tango](https://www.tango.us/) looks interesting… any thoughts about it?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 29, 2022, 3:24am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/5 "2022-01-29T03:24:56Z")

</div>

I might use it more in the forum. It helps displaying things step by step, which helps new people a lot. An alternative I also like is [ScribeHow](https://scribehow.com/).

---

<div class="post-metadata">

**Author:** ![jabid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jabid/32/33391_2.png) [@jabid](https://community.glideapps.com/u/jabid)\
**Post date:** [January 29, 2022, 4:44am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/6 "2022-01-29T04:44:24Z")

</div>

Thank you…

I had a less complicated use-case but l still couldn’t solve a part of it.

I created a table called Banners to display images (ads) randomly on the same location. I just used an image column and a SV column (random function) and the list (in the GDE) should show only one image. It works. This is the app I shared yesterday: [app.culturebookcollector.com](http://app.culturebookcollector.com)

When I wanted to associate the website link to each image, things got a lot more complicated. The only link that was displayed was the first one. Is your description can apply to my use-case?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 29, 2022, 4:47am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/7 "2022-01-29T04:47:55Z")

</div>

Assuming your Banners table has 2 columns: image & link, add a rowID column to it.

Your SV should be able to return a random rowID, then filter an inline list by that random rowID. You can show the image and add an open link action.

---

<div class="post-metadata">

**Author:** ![jabid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jabid/32/33391_2.png) [@jabid](https://community.glideapps.com/u/jabid)\
**Post date:** [January 29, 2022, 7:56am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/8 "2022-01-29T07:56:44Z")

</div>

That does not seem to work…

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [January 29, 2022, 8:58am UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/9 "2022-01-29T08:58:53Z")

</div>

Please attach a video or some images of how you are setting it up.

---

<div class="post-metadata">

**Author:** ![jabid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jabid/32/33391_2.png) [@jabid](https://community.glideapps.com/u/jabid)\
**Post date:** [January 29, 2022, 12:06pm UTC](https://community.glideapps.com/t/possible-to-click-and-display-random-item-from-a-list/37835/10 "2022-01-29T12:06:34Z")

</div>

I guess it’s a complicated use case. Maybe the whole approach should be changed.
