Data Viewer List from Firebase

Not sure what I’m missing here to retrieve data and display it in the Data Viewer List.
I know I’m connected to firebase properly because I can view the data in a normal list viewer.
My result with the blocks I have below is only grabbing the first item j
And oddly enough sometimes when I refresh it by dragging it down it will simply copy the row again, but with the same data from row 1.

Edit: I forgot to mention I did already set the bindings.

Most likely, the loop is executing too quickly for the create row to complete during each iteration. Try adding a Wait 0 seconds block to the “do” section. If that doesn’t work, try Wait 0.1 seconds. You may instead need to put the Wait block below the create row block.

2 Likes

When I’m using loops or asynchronous blocks, i use also some “waiting” variable to be sure that app have enough time to fulfill my data

3 Likes

Yes, this is a good way to set it up. Thank you for posting that screenshot.

I have now done the following still with no resolve.

That’s different than what @mimostel posted above which includes a repeat while block. Yours just changes the variable value but never checks to see what the value is.

Also, please test your blocks with a more simple create row setup to make sure you can create a row in your spreadsheet (if you haven’t already tried this). In other words, once you get the blocks corrected from above, you might just use a list {1, 2, 3, 4, 5} and set the column 1 value and column 2 values to j. Verify that that works and then go back to using your Firebase values. Because you need to make sure the problem isn’t with accessing your data source in general.

1 Like

Thanks for catching that repeat block I missed.
I have since create an exact clone of his blocks and have found that it’s still not working.
Upon further investigation I’ve found I can’t connect to my data sources, I have one that is stuck and I can’t delete it, nor can I create new data sources.

I’ve opened an intercom chat to see if I can get some help with this.

1 Like

You cannot delete a data source connection if it is already used in any of your projects. Check to see the project count is 0 before attempting to delete.

just as an input I am not using the native connection because I found that it is difficult to control with the wait…
So now I am always using the webapi (even for auth). I did not play a lot with the realtime db but with firestore. with the use of the response of the web api you do not have the issue of the response.

If you need I can do a quick sample with my db. let me know.
Alex

1 Like

Realtime DB is easy. Just use the Database URL as the URL for the Web API and add to it the keys in the database and end it with .json.

See this for more details

Sorry I meant that I worked with realtime db and yes it is easy but I prefer to use the web api.
Even for the auth because if you want to work with firestore or other component you will need to get a token that the buildin component of thunkable will not give you (it is normal it is not its purpose);

1 Like

I work with Firestore but I set the rules .read to true so I do not need to use a token and that fits the requirement of my app and makes retrieving documents from Firestore easy.

I was not aware of that, thank you for that info. I’m showing there’s 1 project, but when I click the link it is blank? Perhaps I deleted that project in the past but the data source doesn’t recognize it and won’t disconnect?

1 Like

Yes, if you deleted a project, the connection will not be removed automatically. You need to get in touch with a Thunkable staff to remove the connection for you.