# Randomize cell on airtable database suddenly stops

**URL:** <https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, randomnumber, airtable\
**Created:** [September 13, 2018, 4:18am UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494 "2018-09-13T04:18:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [September 13, 2018, 4:18am UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/1 "2018-09-13T04:18:22Z")

</div>

Hi, I am trying to make a flashcards app from a database of my own in airtable. For now I have a random number process on a numeric variable (“random number”) that selects a cell (question column) and then flip the card to show answer (answer column), then the variable is randomized again. But for some reason I don´t understand this process suddenly stops after 2, 3 or 4 randomizings, even though I have 10 rows in my database. It is really variable, sometimes I just close and open Thunkable Live App and works better or worst than last time, but it´s innevitable that it will stop after no more than 4 events. I am really new on this stuff and I have no clue what to do, i would really appreciate your help.  
PS: sorry if my boxes are extremely simple or rookie haha.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/58b3bd61e3eba6f04707bb1d469b8aec10a9e601.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [September 13, 2018, 7:09am UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/2 "2018-09-13T07:09:04Z")

</div>

Hi,

For more reliable work, you need to copy all the data from AirTable to List and then work with the data in this local list.

After that, debug and see what indexes are passed to the list and what the list returns.

Green block “value” - local variable. Do not use it outside the “then do”

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [September 13, 2018, 5:28pm UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/3 "2018-09-13T17:28:22Z")

</div>

Hi, thanks for your help. I’m sorry again if this is too simple but, by getting the data on local list you mean like using box command to create a list from data on airtable? Or getting the data on firebase or local storage, and then calling that data.

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [September 13, 2018, 8:00pm UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/4 "2018-09-13T20:00:03Z")

</div>

I´ve found the answer from one of your replies in another recent post . I will try it, if I have any other problems I´ll let you know, thanks [Airtable Blocks](http://community.thunkable.com/t/airtable-blocks/41728/9?u=rojored12)  
However is this local list solution is better than put date into firebase or other similar API and work from there?

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [September 13, 2018, 11:30pm UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/5 "2018-09-13T23:30:12Z")

</div>

@rojored12, I think that some of the behavior you are seeing is from your use of the `'change random number by'` block in your `'to draw card'` function. The `'change random number by'` block actually keeps adding a random number between 1 and 10 to your `'random number'` variable. After a few clicks that `'random number'` variable’s value will exceed 10 and things will stop working.

I think that if you replace your use of the `'change random number by'` block to a `'set random number to'` block then things will work better.

Also, note @actech’s warning that you shouldn’t the `'value'` block outside its corresponding `'then do'` .

-Mark

---

<div class="post-metadata">

**Author:** ![rojored12](https://avatars.discourse-cdn.com/v4/letter/r/47e85d/32.png) [@rojored12](https://community.thunkable.com/u/rojored12)\
**Post date:** [September 14, 2018, 1:19am UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/6 "2018-09-14T01:19:15Z")

</div>

It worked perfectly changing the box to “set” insteade of “change” and by removing the “value” box that was outside the “then do” area. Now I will have to work on the recomendation to work on local list suggested by @actech which I am struggling a lot due to my low expertise in coding stuff.  
But thanks again to both!!!

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4da9e8c7e014d8b2a7c1d667e96a460d2fbc1dd6.png)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [September 14, 2018, 6:40am UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/7 "2018-09-14T06:40:17Z")

</div>

An example of getting all the records from AirTable to the local list is \_list. After that, you can save the \_list to LocalStorage and use it on any screen without accessing AirTable.

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a69cdda0fcf553f26975dabdd3130b5194bd7a88.png)

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [September 14, 2018, 5:19pm UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/8 "2018-09-14T17:19:21Z")

</div>

Note that if you are going to just save the list to LocalStorage, you can simply directly save the `'rows'` list. For example:  
 ![49%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/c/7cee09cc71aa9a76e7aa6286b180653da57736a6.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:55am UTC](https://community.thunkable.com/t/randomize-cell-on-airtable-database-suddenly-stops/46494/9 "2024-11-08T11:55:32Z")

</div>


