How to pick data from firebase to make a profil screen without making a list

Hi everyone ! I’m new on this plateform.
I want to crate a Profil screen using data saved from the signing up screen.
I don’t want to use listviewer but text labels.
So my profil screen contains: “First name” “Last name” “Birth date” “Gender” “Email” and lastly “Password”
I saw a couple videos but it wasn’t helpful. I already stored the informations in firebase but i didn’t found a solution to place them in my profil screen. Could you help me pls.
Capture d’écran 2023-05-04 121246
@muneer
Here’s my stocking data blocks in the sign up screen :
Capture d’écran 2023-05-04 131207

1 Like

Please change your topic title to reflect the type of question you have. Unless you’re paying @muneer, he’s under no obligation to help you or to rush to answer your question.

2 Likes

I would recommend removing your email address from the screen shot. It’s best to keep that private!

To get data from Firebase, use a cloud variable. For example, you could do Set Label’s Text to cloud variable [join] "[app variable userid] “/profil/” [convertEmailtoId] “/First name” to get the First name from Firebase.

2 Likes

Can you show a screenshot of your Firebase database?
This will help to make up the cloud variable from the data buckets.

Make sure that the function convertEmailtoId never fails and always return something.

Capture d’écran 2023-05-05 133814
Sorry I didn’t see the message. I’m so sorryy @muneer .
And here’s the function convertEmailtold
Capture d’écran 2023-05-05 134238

Your Firebase data screenshot doesn’t match the data you stored in the screenshot above.

You stored data at:

[app variable userid]/profil/[email address]

But your screenshot shows:

/profil/[email address]

Please try using cloud variables to get the data. I would try these and let us know what works:

  1. Set Label’s Text to cloud variable [join] "[app variable userid] “/profil/” [email address] “/First name” to get the First name from Firebase.

  2. Set Label’s Text to cloud variable [join] "/profil/” [email address] “/First name” to get the First name from Firebase.

Make sure to replace [email address] with an actual email address from your Firebase database.

If both of those fail, post a screenshot of the blocks you tried for each and we can go from there.

1 Like

Thanks a lot, I’ll try this.

Blocks:
B1
Results:

Same results:
R2
B2

It’s possible that your Firebase rules are not allowing retrieval of data.

Ru
@tatiang

Are you still in the trial period? After 30 days, those rules will no longer work.

Is there a reason you’re replacing periods (.) with carets (^) in email addresses? The problem is most likely that you’re storing the key with a caret but trying to retrieve it with a period.

1 Like

OMG it worked

@tatiang Thank you sooo much for your help. The problem was in the function convertEmailtold

1 Like

Why when I’m trying to sign up with a new email the old informations of the old email are replaced by the new one in Firebase? @tatiang

I don’t know what you mean. Are you saying that when you sign up once with email a@a.com and store data in Firebase and then you sign up later with b@b.com, it overwrites the data stored for a@a.com?

Exactly @tatiang

What blocks are you using to store the data in Firebase? What blocks are you using to sign in to Firebase? Are you using any stored variables to save the userID or email address?

E

1 Like

I recommend placing any blocks you care about before a navigate block. It may still work that way but it worries me.

Are you checking to see that the userid is what you expect it to be on the next screen?

And what about my other questions:

And how are you storing the email address? I don’t see that in the screenshot above.

If it’s easier, you can post a link to your project.

1 Like