Saving information in Firebase to specific accounts

Hello everybody,

I am a beginner at MIT APP Inventor and I stuck on a problem using Firebase as Database.
I am creating an app for window's glass vendors, at the first screen they creat an account using firebase authentication.After this, they can register their clients information in a listpicker, so they can check their clients name, phone number, address, email. The thing is we are working with two kinds of variables, the primary one is the vendor, and each vendor may have your own client list to check those information. I created two different accounts, vendor A and vendor B. In vendor's A I registered two different clients, after that I signed out and logged in with vendor B account. When I opened the clients list with vendor B, I could see those two clients information from vendor A. In this case, could this be a Firebase permission problem or something that could be fixed in my blocks?
Sorry about my english! Feeling a little bit rusty, but I hope you guys understand my question.

I think you better show all of your blocks

get an image of your blocks

get an image of your blocks (→ right mouse click in Blocks area)

How to ask a question (open new topic)

Useful Links :

🔥 Register and Login using Firebase Authentication for your app

Firebase with Web Component

🔥 Firebase Security Awareness!

HOWTO: Have Secure Rules on Firebase, and allow Auth Users to Read/Write

1 Like

Here are the blocks. If something is missing, please let me know. !

The first pic shows the blocks for creating an account with authentication. The second one the clients registration.

Thanks for help!

I see two problems for starters ...

Here, you are using true/false values as part of TinyDb tags.
Maybe you wanted .Text instead of .NumbersOnly?

Here you are requesting attributes of a chosen client by the values in text boxes, instead of by fixed text tags leading to the appropriate stored values.

I recommend using the Firebase console to see (and show us) the data structure.

It should look like

          "email": ""
          "email": ""
Access to these attributes would be through tags that look like

Note that I am mixing literal (unchanging) text with actual values as a navigation aid through the tree of data.

Thanks man! I removed that from my blocks! Now I'm going to try this as you said! I feel that I still got a lot of work to do! The mechanism I would like to build is not working at all as you told me at the second reply. I tried to save all the registered clients inside a listpicker. And when you click on the (show list) button it would show the clients, and after you hit the client, we get all his information from the database. But it's not working yet.

That's what I tried to do. But I made it using TinyDB, now I am trying to do in Firebase.