Document from Reference

This backend query would help you in retrieving information from a document reference. You will require the Document from Reference query if you have passed a document reference to a different page of the app and want to retrieve the actual document information from the reference.


In order to use this backend query, you should have:

  • Completed all the steps of Firebase Setup for your project.

  • At least one Firestore Collection is defined in your project.

Defining the Query

Go to your project page on FlutterFlow and follow the steps below to define a Document from Reference backend query:

  1. Select the widget (or page) on which to apply the query.

  2. Select Backend Query from the Properties panel (the right menu).

  3. Select the Query Type as Document from Reference.

  4. Choose a Collection from the dropdown to which the document reference belongs.

  5. Select the Source as the record reference name.

Using Query Data

The document information retrieved from the backend query can now be set on the widgets present inside. Follow the steps below:

  1. Select the widget (eg, Text) on which you want to set the record data.

  2. From the Properties Panel, select Set from Variable.

  3. Choose the Source as the record variable.

  4. Under Available Options, select a field name.

  5. You can also specify a Default Value (it is used if the record field is empty).

  6. Click Save.

You can follow similar steps for using the record data on the other widgets as well.

Last updated