Displaying and Storing User Data in Firebase

Okay thank you so much!

Oh and also, how do I get data from a different tree? From example I want to get both the Users and the test here
Tree Heirarchy
And then put it somehow in the label Calories

From all users what are the details you want to get?

The one at the bottom that is sepperated from Users

test/Steps : 40

If you want to call the bucket test pls set project bucket to test and call the tag Steps

Well it can store the values, but it goes to another node instead to the desired UserID I just made. Also it still cant get the Steps branch
Tree Heirarchy
Maybe check it again?
Trackpaws1.aia (996.3 KB)

Maybe your idea of where to hang 'steps' in the tree needs to be revisited.

Are you tracking:

  • a global policy for the number of steps required daily for each user?
  • the number of steps taken by a user?
  • the number of steps taken by a user's pet (my goldfish?)

Each possibility requires steps to be in a different branch of the tree.

I kept the steps outside the tree because its value is being recieved from a device I made(Its kinda like a Pedometer to count steps), so I kept it outside the Users Tree for now. But to answer your question, the number of steps taken by a user's pet.

You will eventually need a way to tie each pedometer device to a user/pet branch.

That would require one of:

  • each pedometer device knows the userID/pet branch to update, or
  • each pedometer has a unique id to hold its reading(s) and you register pedometerIDs against user/pet IDs somewhere in the tree.

Yes that would be the plan, but I can only make one right now. For now I will separate in another tree

When you use separate branches for Firebase data, you need to compensate for that when you receive data from Firebase.

You need to test the ProjectBucket to tell you which branch you requested.
You need to test the tag arrived with its value.

All that testing needs to be done in the Firebase.GotValue event(s)

I don't see you doing that.

Thank you very much

1 Like

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