# New to Glide -- Button that displays random cell?

**URL:** <https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946>\
**Category:** Ask for Help\
**Created:** [May 28, 2020, 6:56pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946 "2020-05-28T18:56:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shabb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shabb/32/838_2.png) [@Shabb](https://community.glideapps.com/u/Shabb)\
**Post date:** [May 28, 2020, 6:56pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/1 "2020-05-28T18:56:31Z")

</div>

I’m just getting started with Glide (free version) and trying to do something super simple but just can’t figure out how to do it – what i’m trying to do is have a tab where there is a button, and when tapped, the UI should simply return a random cell from a specific column (or a random row if more than one column) and display it without revealing anything else. Each button tap displays a new random cell. Thanks in advance for any tips you can share!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 28, 2020, 8:41pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/2 "2020-05-28T20:41:08Z")

</div>

You can try to use the new reshuffle action item.

[🔀 Something random this way comes](https://community.glideapps.com/t/something-random-this-way-comes/9257)

---

<div class="post-metadata">

**Author:** ![Shabb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shabb/32/838_2.png) [@Shabb](https://community.glideapps.com/u/Shabb)\
**Post date:** [May 28, 2020, 9:22pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/3 "2020-05-28T21:22:43Z")

</div>

thanks robert! mind re-linking – the link you shared says its private or does not exist.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 28, 2020, 9:38pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/4 "2020-05-28T21:38:16Z")

</div>

> [@twisted\_rightwards\_arrows Something random this way comes](https://community.glideapps.com/t/something-random-this-way-comes/9257):
>
> In staging now…the shuffle action!

---

<div class="post-metadata">

**Author:** ![Shabb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shabb/32/838_2.png) [@Shabb](https://community.glideapps.com/u/Shabb)\
**Post date:** [May 28, 2020, 9:44pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/5 "2020-05-28T21:44:16Z")

</div>

ah gotcha, not exactly what im trying to do but ill give it a try!

---

<div class="post-metadata">

**Author:** ![sardamit](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sardamit/32/263_2.png) [@sardamit](https://community.glideapps.com/u/sardamit)\
**Post date:** [May 28, 2020, 10:57pm UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/6 "2020-05-28T22:57:57Z")

</div>

You need:

1. A column to register an update event (switch).
2. A column that calculates a random number between 0 and max rows in your list.
3. Use this random number to lookup with INDEX() and return a row.

If you can show your app, it will help us answer your question better.

---

<div class="post-metadata">

**Author:** ![Shabb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shabb/32/838_2.png) [@Shabb](https://community.glideapps.com/u/Shabb)\
**Post date:** [May 29, 2020, 6:32am UTC](https://community.glideapps.com/t/new-to-glide-button-that-displays-random-cell/9946/7 "2020-05-29T06:32:30Z")

</div>

Thanks, Amit.

app isn’t really functional so not sure if there’s value in sharing. at a high level, trying to create to main pieces of functionality:

1. Data entry screen with 1 to n fields that creates a new row in a spreadsheet
2. A retrieval screen where when the user taps a button, it will randomly return an entire row (or even just a random cell from a specific column). The total number of rows isn’t fixed however, since its dependent on how many things are entered in the first screen. (i’d also be curious on how to delete that row that’s been returned here but I think thats easier based on the features ive played with so far).

im gonna play around some more and see if i can figure out how to construct this logic, but if you have pointers, i’d welcome them. Thanks!
