"Firebase .DataChanged" block doesn't work

I am worried by some of the tags used in FireBaseDB2 reads in Screen acc.

Slashes (/) are special in FireBaseDB tags. As far as I know (correct me if I am wrong), they can be used to make branch points in the database structure for storage of detail branches under a master branch. If you use the FireBase data browser, you should see where they have been used, though the results would look the same as if you had changed the Bucket to climb the tree.

I don't see any screen shots in this thread of the data structure in your DB. That might prove instructive.

oh, thank you! I did not notice. I will check later.

This code worked like that. Only this block does not work.

There are 2 possibilities:

  • the event is not firing at all, or
  • the event is firing, but the tag and value don't match any of your tests, so you are ignoring them.

If you log the tags and values received by the event, that helps you investigate which possibility has happened.

Most likely the event is not fired. I double-checked everything.

To be sure, change the sequence of if/then blocks in the Data Changed event to a single if/then/elseif/elseif/else block, using the blue mutator. Be sure the last else branch announces the unexpected tag into a Label or a sticky Notifier.

The dataChanged event will not fire if changes are made to the data "outside of the app", or if the app has not yet "connected" to fireabse by making a change.

1 Like