Break a loop outside it with Firebase

Hey there, I’m trying to break a for loop outside it with Firebase, but no works: the loop continues till the end, instead of breaking when a value is equals to a specific thing:sweat_smile:
This is what I tried:

SCREEN

1 Like

Do you have any value tag with “S” in your firebase? also what you are trying to do, unable to guess

1 Like

Do you mean a value or a tag with “S”?:thinking: I have some tag called with different names and at least one value of these tag is “S”

1 Like

Try to note down all the values that are received. For that you can use a list, and display it in the label. (For debugging purpose only)
It might be that all values come out to be “NOTHING”, if your URL is set wrong.

Try this, and let us know.

1 Like

Here is my approach:

Using recursion

Get the tag list and store in a global variable.
Make a method (procedure, the purple block that wraps blocks) such that it gets the value of the tag list ONE BY ONE.

Run the method after storing the tag list.

Inside Got Value event, if the value is NOT “S”, run the same method with the new tag, until no more tag is present.

I currently don’t have my pc available so I can’t show you what exactly I’m talking about.

1 Like

I don’t understand very well what you say, however I have tried with these blocks to do it and they works, thanks:partying_face:

SCREEN

1 Like

I dont know what you are getting here also. In the above image it self some logic is missing,it seems,…Anyway if it works mean no issue…