Firebase Auth, Firestore & Storage (plugin)
  • 🚀Getting Started
  • Setup
    • Create a Firebase Project
    • Get Firebase access credentials
    • Offline Support
    • Secure your credentials and data
      • Restrict your api-key to your domain
      • Security Rules on Firebase
  • Plugin Elements
    • 🛠️About elements
    • 💾Data Schemas
    • Firebase Auth (Current User)
    • Firestore Data List
      • Firebase Geohash
      • Firestore Data (legacy)
    • Firestore Data Extractor
    • Firestore Data Single
    • Firestore Data Aggregation
    • Firestore Data Processor
    • Firebase Storage Upload Button
    • Firebase Action Listener
    • Firebase Dropdown Processor
  • Plugin Front-end Actions
    • 💻About front-end actions
    • 💾Field types table
    • Firestore
      • Create a new document
      • Update a document
      • Delete a document
      • Update a list of documents
      • Delete a list of documents
      • Batch Operations
        • Batch Operation Constructor
        • Batch Operation Commit
    • Firebase Auth
      • Sign the User Up
      • Log the User In
      • Log the User In with Google
      • Log the User In with Facebook
      • Log the User In with GitHub
      • Log the User Out
      • Update User's Profile
      • Update User's Password
      • Update User's Email
      • Send password reset email
        • Handle reset password code
      • Send verification email
        • Handle verify email code
      • Delete current user
    • Firebase Storage
      • Upload file base64
      • Delete uploaded file
  • Plugin Back-end Actions
    • ☁️About backend actions
    • Firestore Backend
      • Get a list of documents
      • Get a single document
      • Count a list of documents
      • Create a new document
      • Update a document
      • Delete a document
      • Update a list of documents
      • Delete a list of documents
    • Firebase Auth Backend
      • Create an account for someone else
      • Update another user's profile info
      • Delete a user account
      • Generate email confirmation link
      • Generate password reset link
      • Set user roles
Powered by GitBook
On this page
  • Settings
  • Firestore Data (list of documents)
  • Front-end sort
  • Front-end filters
  • Extract fields from a list of documents
  • States and Values
  • Data list
  • Data list (w/ schema)
  • Documents IDs
  • Fields Lists (1, 2, 3...)
  • Error message
  • Data is Ready
  • Events
  • Data ready or changed
  1. Plugin Elements

Firestore Data Processor

PreviousFirestore Data AggregationNextFirebase Storage Upload Button

Last updated 11 months ago

The Firestore Data Processos is similar to the element, but it does not query data from Firestore. Intead it process data that's already available on the front-end, in a Firestore Data element or other kinds of list JSON fields.

It works exactly as the Front-end sorting and filtering settings on the element.


Settings

Firestore Data (list of documents)

The data to be processed.

Usually this data will be a list of documents from a Firestore Data element, but it can also be any list of JSON objects. For instance, you could get an "array of maps" field in a document and process it with this element. The only difference is that the "doc_id" will be empty, since these maps might not have the "_id" field.

Using the Firestore Data Processor is an excellent way to avoid duplicate reading of documents, reducing costs with Firebase, since your data source will already be on the front-end.

Front-end sort

Front-end filters

Comparison / Operator
Description

==

Gets values equal to the provided input.

<>

Gets values not equal to the provided input.

>=

Gets values greater than or equal to the provided input (must be of type number or date).

>

Gets values greater than the provided input (must be of type number or date).

<=

Gets values less than or equal to the provided input (must be of type number or date)

<

Gets values less than the provided input (must be of type number or date)

contains

Gets values where the field of type array/list has the value provided as input.

contains-any

Gets values where the field of type array/list has any of the array of values provided as input.

contains case sensitive

Gets values where the field of type array/list has the value provided as input, but differentiating uppercase from lowercase characters.

doesn't contain

Gets values where the field of type array/list doesn't have the value provided as input.

doesn't contain case sensitive

Gets values where the field of type array/list doesn't have the value provided as input, but differentiating from uppercase and lowercase characters.

is in

Gets values where the field value is present on the array of values provided as input.

isn't in

Gets values where the field value is not present on the array of values provided as input.

isn't empty / count > 0

Gets values where the field value doesn't exist, is empty or, if it's an array/list, its length is zero.

is empty / count = 0

Gets values where the field value exists, is not empty or, if it's an array/list, its length is greater than zero.

Extract fields from a list of documents

You can provide the names of the fields you'd like to get as a list on Bubble, on the list of document's or Maps being processed.

You can you "dot notation" to dive into the JSON structure of a Map field in a document (e.g. address.street to get the "street" property of the "address" field, if it is a Map type)

Field types

For each field you choose to fetch from the document, you must specify the type of data Bubble should try to receive.

In some cases, more than one type can be applied, like in boolean values, that you can get as "text" or "yes/no". In other cases you must be careful to declare the right value, or error can occur, like when you try to declare a "number" for a "text" value.

Get list inside field

This option allows you to merge fields of type list in one single list.

For instance, if you have two documents with a field named "tags", that has a list of texts (one ["tag1"] and the other ["tag1", "tag2]), this option will merge them as ["tag1", "tag1", "tag2"] instead of bringing two array values as texts (i.e. ["tag1"], ["tag1", "tag2"]).

Ignore filters

This option will make the list of values ignore the front-end filters applied to them.

This is useful when you want to use this list to feed the choices source of a Dropdown or input that you want to use as a front-end filter. If you leave this option unchecked, the choices sorce would be filtered too.


States and Values

The Firestore Data element provides states according to the query type you chose on it's settings.

Data list

Data list (w/ schema)

Documents IDs

A list of texts contains the IDs of each document (it extracts the field "_id").

Fields Lists (1, 2, 3...)

Lists of fields you chose to retrieve from the documents list, with filters already applied.

Error message

If an error occurs, the error message will be stored on this state.

Data is Ready

Turns to "yes" when all the element's states are done being filled, an "no" when they are being filled.

Although this operations are fast, the fact the they are filled in order and not at the same time may lead to issues, that's why this state was created.

Events

Data ready or changed

Triggered when the data from the processor is all loaded and ready to be used.

Sorting here works exactly the same as on the front-end operations in the element. This is ideal for performing fast sorting or filters as a reaction from input value changed on the user's UI.

To sort data, you must specify the name of the field, it's type and the direction (descending = yes | ascending = no). In most cases, you'll want to make the sort field be the same from the .

A list of document JSON strings, that can be provided to repeating groups and then, on each cell, extracted through a to get the values from the document fields.

A list of documents, interpreted through the "data schema" you define on an API Connector and provide to the element. See how to configure this on the documentation.

Firestore Data
Firestore Data Extractor
Data Schemas
"query sort" field
Firestore Data
Firestore Data
Tasks will be sorted by the "done" field (boolean = 0 or 1).
Front-end filter types