How to Retrieve Document Reference and Value from a Firebase Dropdown Selection

Actions & Logic

Hi Everyone,

I need help figuring out how to retrieve both the document reference and the actual value from a dropdown. My goal is to allow the user to select an account from a dropdown menu. The available accounts are stored in Firebase.

When a user selects an account, I’d like to:

  • Save the account name in a page state called selectedAccount.

  • Store the document reference in a state called accountRef.

Can someone guide me on how to achieve this?

Thanks in advance!

What have you tried so far?

I tried using an onSelect action to load a query filtered by the selected account, aiming to retrieve a single document and store its reference in the state. However, this approach didn’t work as expected.

Did you check FlutterFlow's Documentation for this topic?
No
1
1 reply