Collection & Documents in Firebase

Hi all,

I have a firebase database and authentication. My users authenticate with email and password. I have a collection in my database called “Users” and within that collection are multiple documents with the following values “firstname” “lastname” “email” “adminuser”.

Whenever I try to output the firstname of the current users it shows the firstname of the document that’s at the top of the list, any idea how to stop that? And allow it to match the current authenticated user email to an email stored in documents?

Well… first You would need to do a “Get record collection” flow with the filter condition as follows: email EQUALS logged in users email address. This will return only one document.

So now You can set your name variable to the output of this get record collection but via a formula binding screen as You will need to refer to that outputs[“Get record collection”].records[0].firstName

So, if I place Get Record Collection on Page Load. with the Filter Formula of email equals logged in users email address, this will grab that document right?

Hey! It worked! Thank you so much!

1 Like