Displaying and Storing User Data in Firebase

Isnt it this one? The button named LoginButton?

blocksign2

oh sorry.. wait.. it was working fine for me.. let me share aia with slight modififed blocks..

Maybe dont include the Tinydb in it? Maybe it doesnt recognize the value in it and leaves it blank, causing it to get a Runtime error?

Then how will you recognise the user? you cannot use email as project bucket or as tag.. thats why suggested.. anyhow test this

Firebase11.aia (10.5 KB)

It works for me here, But I'm still not sure how mine is not working since I copied it.

Maybe you can check it?
Trackpaws1.aia (958.2 KB)

  1. No tinydb block to save userID
  2. Wrong dictionary block used

test this

Trackpaws_1.aia (959.1 KB)

Thanks for the help! Btw can I transfer the Username to the next screen using this?
blocksign

no need to send, just use the same tinydb block with same name tag and name space

When Creating a new user, After I finished making the LoginInfo, Can I make another branch info with the same Signup button? Like make a new path like Users/UserID1877/Pets?

Yes, just go on with same procedure (i hope you have learnt now how to make a tree for per user, same way go on..) Avoid using logininfo.. Because for single user no prob, but if it were multiple users it will be harder to lookinto..

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