I’m gathering data from firebase, but whatever I enter (data present or not in the database) I always get the else part of my if condition showed below :
I’m 100% sure the issue is in the if condition because when I remove it everything works fine. What should i put in value = ?
PS : I also tried changing value to the “namee” variable but nothing will do
So please can someone make a post with an explanation on when to use an empty string, when to use the "null" string and when to use the null block ?
and always check your “value”-components twice. sometimes they mess up and you have to clear them all and then get them again from the right purple sourceblock.
yes, I see the reason very clear: you remember that the repeat loop is like sending people to bring a beer?
the repeat loop will be done in 5 milliseconds, then label… in 1 millisecond, then if…then…else if… in 5 milliseconds.
And then after 500 -3000 milliseconds the then-do-section will trigger(people come back with beer and count is set.
Just a note that in almost all cases the best and easiest way to check for an error in a 'then do' section of a block is to simply test for 'if error'. That is:
That 'error' value will be a string describing the error.
Unfortunately the Local Storage component is the one case where we don’t (yet) provide an 'error' block. We do, however, return the string “null” when there is no value from the Get block for the given key. The choice of returning a string, rather than a real null value (i.e. the “green null block”) was probably a bad choice on our part