Firebase function bug

I am wondering if it is a known bug.

Since there are already too many blocks, I move some code into a function. From the left-hand side, it calls the function from the right-hand side. If I remove showList function call, the cloned record will be 1,2,3 which is normal. However, if I call the showList, it will become 1,1,1,1.

Does anyone know what’s going on? Thanks!

Your question is quite difficult to answer, because, first, the whole scheme of calls is unclear (you probably use asynchronous calls), second, app blocks now work strangely and it is better to use something else instead of them, and third, after the latest updates, clone blocks began to work in a way that I personally do not understand.

What do you mean by the app blocks working poorly? Is there any option that I can look into?


There are regular problems with app variables, which is why I personally don’t use them much.

Can you explain a little bit more the problems of the app variables? What would you suggest in that case?

Since I need to compare the user list and return a new list, I need to declare various variables for comparison. I also find out that the variable will not be accessible if the variable is being update within the firebase get method.

Currently, they have this problem: the values are not updated.

Any workaround for this problem?

Other users suggest using stored variables. You can also use LocalDB

got it so what you are doing is putting the value into alert, then retrieve it from another screen. I guess I would simply use stored variable as my variables include other data type.

By the way, what do you think about Firebase REST API? Is it better than the default firebase block?

It doesn’t really matter what you use to transmit data. What matters is how much data can be transmitted in different cases. I can use Alert to pass both objects, a list, and something else, but it may have limitations and may pass less data than a stored block.

Unfortunately, I’m only familiar with the AirTable REST API and I like It. If I have the opportunity, I will also look at the Firebase REST API.

Really thanks for the advice!

Btw, I want to ask you one more question as below.

I know that the Realtime_DB1 is basically async, is it correct that the updated value will only be accessible within the async? Thanks!

All purple blocks work in asynchronous mode and the result of execution is passed to “then do”, where you should get it. For this reason, Label20 in your drawing will get incorrect data, because the asynchronous block may run later than the block that follows it.