# Random formula makes everything crash

**URL:** <https://forum.adalo.com/t/random-formula-makes-everything-crash/35922>\
**Category:** Get Help\
**Created:** [February 2, 2023, 4:52pm UTC](https://forum.adalo.com/t/random-formula-makes-everything-crash/35922 "2023-02-02T16:52:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jules](https://forum.adalo.com/u/Jules)\
**Post date:** [February 2, 2023, 4:52pm UTC](https://forum.adalo.com/t/random-formula-makes-everything-crash/35922/1 "2023-02-02T16:52:37Z")

</div>

Hi!  
I followed this video to pick a random item from data base : [Generating Random Item in Adalo collection - YouTube](https://www.youtube.com/watch?v=dBszBXf22G4)

I have an input counting rows in my database and another input choosing a random ID number between 1 an the value of the input counting. This to display a random item on a list.

In order to change the random choice, I created a button that leads to a white page and "When a user visits the screen"it goes back on the previous page and the custom formula pick another random ID.

In preview mode it works but then, on any device accessible with the share button a blank screen appears every time.

Here a video of this **working** and just imagine a blank page when I click on the arrow button.  
[https://watch.screencastify.com/v/uxVcAecEaoq4UEgFWVdY](https://watch.screencastify.com/v/uxVcAecEaoq4UEgFWVdY)

Any suggestions? Thanks a lot!

Jules

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [February 2, 2023, 10:27pm UTC](https://forum.adalo.com/t/random-formula-makes-everything-crash/35922/2 "2023-02-02T22:27:38Z")

</div>

Hi Jules,

Welcome to the community 🥳

Black screen appears at the start when viewing the app or when performing that feature?

Maybe try to do this with a number property in the users collection and not with inputs! Like this : [Random Item.mp4 on Vimeo](https://vimeo.com/795403371)

Thank you

---

<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 12, 2023, 10:27pm UTC](https://forum.adalo.com/t/random-formula-makes-everything-crash/35922/3 "2023-02-12T22:27:45Z")

</div>

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