Randomize cell on airtable database suddenly stops

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.

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”

1 Like

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.

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
However is this local list solution is better than put date into firebase or other similar API and work from there?

@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

1 Like

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!!!

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

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