Unable to delete the last node in firebase

hi
I’m sure I read in a post that I could do this

to delete that

i read wrong ?

update :
it works as long as there is more than one element left to delete, it’s the last one that gets stuck

1 Like

Set connected to null

Will delete all nodes under connected in one single command.

@muneer, that will also remove “connected” won’t it?

Could you set cloud variable connected to an empty string or empty list? I haven’t tried that but it might work.

1 Like

Actually when you set a node to anything you like it will overwrite whatever value it holds whether it is a simple value or a complete structure.

So you can choose to set it to a default value that you specify.

I supposed I was trying to make a distinction between deleting the node, which will occur if you set “connected” to null, and setting the node’s value to an empty string which will keep the “connected” node.

But really, it doesn’t matter because either way, when you want to repopulate the node, you have to use the full path to the node in Thunkable (connected/______) so it gets created anyway.

Probably cleaner to just set the node to null as you suggested.

1 Like

hi

i set connected to null and the app crashes

1 Like

You will need to provide a lot more information!

1 Like

It would most probably happen not due to setting the master bucket (node) to null but the app retrieves information from such node and act upon it without testing if it is null or not.

If you assign a label a null value, nothing will happen but if you try to assign an object or a list then the app would crash.

Hope this clarifies the matter. This is only my assumption as you need to give enough details to get a more detailed and relevant answer.

3 Likes

indeed my application did not take into account this new writing to erase the last node

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.