# Select random item, list recommandation?

**URL:** <https://forum.adalo.com/t/select-random-item-list-recommandation/9078>\
**Category:** Get Help\
**Created:** [February 11, 2021, 2:28pm UTC](https://forum.adalo.com/t/select-random-item-list-recommandation/9078 "2021-02-11T14:28:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cihan](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@cihan](https://forum.adalo.com/u/cihan)\
**Post date:** [February 11, 2021, 2:28pm UTC](https://forum.adalo.com/t/select-random-item-list-recommandation/9078/1 "2021-02-11T14:28:14Z")

</div>

Hi all,  
Actually, I built an app, and I used a random picker component. But I can’t satisfy with it, and it has some bugs. Do you have any idea to get some records from DB randomly? If it had possible, I could do it with a single-line SQL script.  
Thanks in advance for your comments.

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [February 12, 2021, 5:19am UTC](https://forum.adalo.com/t/select-random-item-list-recommandation/9078/2 "2021-02-12T05:19:20Z")

</div>

I assume you could use the random number formula. So each record in your DB has a numeric ID field. Then the user has a ‘randomNumber’ property. Have a button (or screen action) that does update \> logged in user \> randomNumber \> function RAN(X,Y). Then have a list displaying items where Record ID = Logged in User randomNumber.

In the random function above, X is the minimum number it will generate, and Y is the maximum number. E.g. RAN(100,200) is going to generate a random number between 100 and 200. So for X you probably want 0, and for Y you want count \> databaseProperty. This should work assuming each record on the database is consecutive e.g. 1 then 2 then 3 etc.

---

<div class="post-metadata">

**Author:** ![cihan](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@cihan](https://forum.adalo.com/u/cihan)\
**Post date:** [February 16, 2021, 9:09am UTC](https://forum.adalo.com/t/select-random-item-list-recommandation/9078/3 "2021-02-16T09:09:23Z")

</div>

Thank you for your help. Actually, my received list items count can change.  
[Savoc - Flashcards](https://previewer.adalo.com/759a4a44-c9f7-4380-ae3a-a361e51d4630) I want to show card randomly when the user taps any emoji ☹

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [February 26, 2021, 9:10am UTC](https://forum.adalo.com/t/select-random-item-list-recommandation/9078/4 "2021-02-26T09:10:12Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
