Problem retrieving/showing data

I’ve got a database with 52 sets of data on Firebase
when I call anything past the index of 19, the data doesn’t show up on appgyver ( I tested each index on the debugger)
Is there any reason why?

I’ve set a pageVars.randomInteger to RANDOM_INTEGER_BETWEEN(0, 51) to get a random index of which to call information. And the data shows up until pageVars.randomInteger has a number that’s greater than 19.

Hi, I would look into the documentation of Firebase – sounds like they might have a limit of returning 20 records per call, and you might need to do multiple calls to get the whole dataset.

In this case I’m retrieving 2 things from the database
a quote, and the person who said the quote (I think, unless the formulas I use below brings up the whole database??)

LOOKUP(LOOKUP(LOOKUP((PICK_ITEM(data.Quotes1, pageVars.randomInteger)), “fields”), “theirQuote”),“stringValue”)

“-” + UPPERCASE(LOOKUP(LOOKUP(LOOKUP((PICK_ITEM(data.Quotes1, pageVars.randomInteger)), “fields”), “theirName”),“stringValue”))

Retrieving data that has an index less than or equal to 19 shows up on the app but retrieving data that has an index greater than 19 doesn’t show up.

The formulas don’t bring up the whole database, but the data variable you are filtering on should. You are not directly accessing the database with the formula, but a copy of its contents that is stored in the data variable.

If I were you I’d try to use the debugger to see if your data.Quotes1 variable really holds all the 52 records or only the 20 first ones (hence indexes beyond 19 not working).

Hello Mari,

As you said it only gets the first 20 when calling so I used http request to get the whole data and saved the output to a variable which I just added to the formula above. It didn’t work out because JSON format is not compatible with the other types.

You mentioned doing multiple calls- was that something like you had in mind?

Hi, what’s the difference between the HTTP request you make (all data) vs your Get collection (just 20 records) setup? :thinking: “Get collection” is essentially a GET HTTP request, so you should be able to configure it similarly to your HTTP request node.