# Display Random Quote (from Glide table)

**URL:** <https://community.glideapps.com/t/display-random-quote-from-glide-table/19227>\
**Category:** Ask for Help\
**Created:** [December 1, 2020, 2:24pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227 "2020-12-01T14:24:33Z")\
**Posts on this page:** 8\
**Page:** 1

<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:** [December 1, 2020, 2:24pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/1 "2020-12-01T14:24:33Z")

</div>

I have a Glide table that contains a column with a list of quotes (one per row), and I’d like to select one at random to display on the home screen each time it’s viewed.

What’s the best way to do this?

(I feel a bit embarrassed that I can’t figure this out, but having a mental block… 🤪)

---

<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:** [December 1, 2020, 4:23pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/2 "2020-12-01T16:23:12Z")

</div>

Use a single value column and point that to the quotes, and choose random.

> [@Copyable: A Tribute To Chadwick Boseman & The World Of Randomness](https://community.glideapps.com/t/copyable-a-tribute-to-chadwick-boseman-the-world-of-randomness/15768):
>
> Hi Gliders, it has been a while since I shared my last tutorial and I plan to do this once in a while, so here’s my next one. You can view my previous post here: Techniques used in this app: Tab visibility for sign up process Random value from single value column to change image & quote on homepage Combining multiple random values and use split text for gamification Conditional visibility + Cloudinary for a quiz-like experience App link: For this post, I make an app to pay tribute to M…

I did that here for the home page as well.

---

<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:** [December 1, 2020, 4:24pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/3 "2020-12-01T16:24:01Z")

</div>

haha, I have a copy of that app. I’ll take a look

thanks!

---

<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:** [December 1, 2020, 5:06pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/4 "2020-12-01T17:06:55Z")

</div>

wah… so easy once you know how to do it.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![MindBridge](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mindbridge/32/60406_2.png) [@MindBridge](https://community.glideapps.com/u/MindBridge)\
**Post date:** [October 10, 2024, 10:59am UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/5 "2024-10-10T10:59:32Z")

</div>

Hi @ThinhDinh sorry to revive this so many years later, but is there a way in which I can filter out which value is ‘randomly’ selected? I want to similarly pull a random text except I don’t want to show a text the user has already seen (I keep a counter of which the user has already seen in my users table)

---

<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:** [October 10, 2024, 2:48pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/6 "2024-10-10T14:48:19Z")

</div>

If you have a list of what the user has already seen, you can use a query and filter the “seen” entries out, then randomize from the remaining list.

---

<div class="post-metadata">

**Author:** ![MindBridge](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mindbridge/32/60406_2.png) [@MindBridge](https://community.glideapps.com/u/MindBridge)\
**Post date:** [October 10, 2024, 9:49pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/7 "2024-10-10T21:49:23Z")

</div>

Thanks @ThinhDinh! If I may borrow your brain a bit more, here’s where I am struggling:

I am trying to build a randomised journaling app where:

- Users prefill 3 of their focus area when onboarding
- I have a data table of prompts across a variety of areas
- Every day / session the user gets 3-4 random prompts to start writing about (biased towards the user’s focus area)
- Ideally, want to give the user an option to refresh the prompts if they don’t like any of the suggested 3-4, and pull a fresh set

Where I am stuck is how do I randomise, allow for refresh AND filter across two parameters - (1) - that the user has not already used the prompt (I update the used prompts in the user table) and (2) that majority of the prompts pulled are from the users’ focus area(s).

I was thinking of setting up a query to prefilter ‘available’ prompts (not seen + from focus areas) for each user and then randomise from that, but wondering if I am overcomplicating here. Even if I do go down this route, is there a way to randomise from the list specific to each user?

Grateful for any suggestions. ☺

---

<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:** [October 10, 2024, 11:43pm UTC](https://community.glideapps.com/t/display-random-quote-from-glide-table/19227/8 "2024-10-10T23:43:59Z")

</div>

> [@MindBridge](#):
>
> I was thinking of setting up a query to prefilter ‘available’ prompts (not seen + from focus areas) for each user and then randomise from that, but wondering if I am overcomplicating here.

Yeah that’s what I advised you to do. You query out a list of available prompts for each user, you should be able to do that if you keep track of what users have already seen.

Then you just randomise from that list. It depends how you’re doing it, can be a collection with a random sort and limit to 3-4 items, it can be custom code to generate a list of IDs when the user clicks a button, etc.
