# Random button

**URL:** <https://community.glideapps.com/t/random-button/6211>\
**Category:** Ask for Help\
**Created:** [March 31, 2020, 8:12pm UTC](https://community.glideapps.com/t/random-button/6211 "2020-03-31T20:12:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwin\_van\_der\_Geest](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/edwin_van_der_geest/32/4978_2.png) [@Edwin\_van\_der\_Geest](https://community.glideapps.com/u/Edwin_van_der_Geest)\
**Post date:** [March 31, 2020, 8:12pm UTC](https://community.glideapps.com/t/random-button/6211/1 "2020-03-31T20:12:13Z")

</div>

Hi,

I’m using Glide for a couple of days now, and I love it. I created this app with a lot of questions to choose from: [https://check-inspiration.glideapp.io/](https://check-inspiration.glideapp.io/).

I created a tab for a Randomizer. Now I would like to add a button to ‘roll the dice’ another time for a new question. So when you click on that button, a new random question appears. Hope I explained it clear enough.

Thanks!

---

<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:** [March 31, 2020, 10:29pm UTC](https://community.glideapps.com/t/random-button/6211/2 "2020-03-31T22:29:28Z")

</div>

Yep! Did something like this here:

[funandgames.glideapp.io](http://funandgames.glideapp.io)

or

> **[Draw Someone Who](https://drawsomeone.glideapp.io/)**
>
> Randomizes a Who-What-Where Scenario

---

<div class="post-metadata">

**Author:** ![Edwin\_van\_der\_Geest](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/edwin_van_der_geest/32/4978_2.png) [@Edwin\_van\_der\_Geest](https://community.glideapps.com/u/Edwin_van_der_Geest)\
**Post date:** [April 1, 2020, 6:41am UTC](https://community.glideapps.com/t/random-button/6211/3 "2020-04-01T06:41:58Z")

</div>

Ah thanks Robert!

I will try to reproduce that. Love your app by the way.

---

<div class="post-metadata">

**Author:** ![Edwin\_van\_der\_Geest](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/edwin_van_der_geest/32/4978_2.png) [@Edwin\_van\_der\_Geest](https://community.glideapps.com/u/Edwin_van_der_Geest)\
**Post date:** [April 1, 2020, 7:02am UTC](https://community.glideapps.com/t/random-button/6211/4 "2020-04-01T07:02:09Z")

</div>

Hey Robert,

I thought I had it. Used a Form button. But When I come back at the question, it’s still the same. Do you use any kind of trick I cannot see?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [April 4, 2020, 8:09pm UTC](https://community.glideapps.com/t/random-button/6211/5 "2020-04-04T20:09:54Z")

</div>

What sheet does your random tab use? Is it the same sheet as the form responses? If it is, then go to features for that tab and set the sort to reverse order. That way the details of the tab should show the last record in the form response sheet instead of the first.

---

<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:** [April 5, 2020, 1:43am UTC](https://community.glideapps.com/t/random-button/6211/6 "2020-04-05T01:43:05Z")

</div>

Yep that was one of my tricks. Use reverse sort order so you always see the most recent choice on top.

---

<div class="post-metadata">

**Author:** ![Edwin\_van\_der\_Geest](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/edwin_van_der_geest/32/4978_2.png) [@Edwin\_van\_der\_Geest](https://community.glideapps.com/u/Edwin_van_der_Geest)\
**Post date:** [April 5, 2020, 7:46pm UTC](https://community.glideapps.com/t/random-button/6211/7 "2020-04-05T19:46:33Z")

</div>

Thanks Jeff and Robert. Somehow it doesn’t work. I’m still a noob, so probably it’s my configuration.

On the random tab I used the detailed view, with random order (based on the same sheet as the all questions tab). That gives me one random question. When I use the button with the form, it doesn’t change to another random question.

What am I doing wrong/missing?

Thanks!

---

<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:** [April 5, 2020, 8:13pm UTC](https://community.glideapps.com/t/random-button/6211/8 "2020-04-05T20:13:02Z")

</div>

In my app, Glide doesn’t determine the random sentence, my spreadsheet does. I don’t use random sort, I let the spreadsheet pic a random number upon form entry and then do a relation to that sentence.

---

<div class="post-metadata">

**Author:** ![Edwin\_van\_der\_Geest](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/edwin_van_der_geest/32/4978_2.png) [@Edwin\_van\_der\_Geest](https://community.glideapps.com/u/Edwin_van_der_Geest)\
**Post date:** [April 6, 2020, 9:19am UTC](https://community.glideapps.com/t/random-button/6211/9 "2020-04-06T09:19:10Z")

</div>

Thanks Robert.

How can I make my spreadsheet to pic a random sentence? (sorry for all those questions)

---

<div class="post-metadata">

**Author:** ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)\
**Post date:** [April 6, 2020, 9:30am UTC](https://community.glideapps.com/t/random-button/6211/10 "2020-04-06T09:30:49Z")

</div>

Assign serial numbers to each question in your spreadsheet, then use the random value formula to choose a random number which varies from the first and last number in your questions. Then relate the number with the questions on your spreadsheet. Every time your press the form button, copy the number value from the random value cell and use that to display the question linked to it.

---

<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:** [April 6, 2020, 2:09pm UTC](https://community.glideapps.com/t/random-button/6211/11 "2020-04-06T14:09:05Z")

</div>

![Screen Shot 2020-04-06 at 10.07.35 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/c7da0486f3f429e4ed64199e52f157062c5a966d.png) ![Screen Shot 2020-04-06 at 10.07.44 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/6ed488af4165934317a34c1c663459d0bcf54b24.png)

The RandomWhoValue Column writes to the WhoValue column for permanence since the RandomWhoColumn will change upon every sheet edit.

 ![Screen Shot 2020-04-06 at 10.08.58 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/38c8f2cccd3849df8e0280f4088b13d92405384a.png)
