+
icon next to Datasources on the left navigation bar under Page1. Project Settings
ensure you're in the "General" tab. Project ID
entry with a value. your-project-id.firebaseio.com
Project Settings
and click on the Service Accounts Tab.
Test
button at the bottom right of the screen. This will help you with understanding whether your configuration is valid or not. If it returns a successful message, hit the 'Save' button to establish a secure connection between Appsmith and Firestore.Commands
drop-down, Select the method Get Single Document
. datasources
and choose the database you created. Get Documents
in the Collection. Collection/Document Path *
to the collection name. +
icon next to widgets on the sidebar, search for the table widget, and drag and drop it onto the canvas. {"name": "Sherlock", "role": "Detective"}
and {"name": "Watson", "role": "Doctor"}
, then specifying ["name"]
in the Order By input will return the documents ordered by the name field in each document. Additionally, any field or path can be prefixed with a -
to order that field in descending order. So specifying ["name", "-role"]
would sort by the name
field in ascending order and by therole
field in descending order.name
or name.first
if the documents look like {"name": {"first": "Sherlock", "last": "Holmes"}}
.name
, the operator can be in
and the value can be ["Sherlock", "Mycroft"]
. This will filter all documents with a name
field set to either "Sherlock"
or "Mycroft"
.collection-name/doc-id
.set document
works.Set Documents
” in the Collection. tasks/newdoc
. In the body section we will add something like:createTask
.Create Document.
Collection/Document Path *
to collection_name/{{Math.random().toString().substring()}}
tasks/{{Math.random().toString(36).substring(7)}}
createTask
under the events property:add the document to collection
works: collection-name
. tasks
. name
field in the document pointed by path will be changed to "Eve"
, but no other fields in the document will be changed."Mycroft"
, but leave the rest of the document (including the last name) intact. Then the body in the update method should be:selectedRow
property from the table widget.+
icon next to the datasources and choose to Create New + from the Firestore datasource. editTask
. Collection/Document Path*
to tasks/{{Table1.selectedRow._ref}}.
Delete Document
from the commands drop-down. +
icon next to the data sources and choose the Create New + from the Firestore datasource. Collection/Document Path*
to:deleteTask
query.["field1"]
.{{queryName.data[queryName.data.length - 1]}}
. The order by field should be unique for this to work in pagination.{{queryName.data[0]}}
.{{queryName.data}}
(or something loosely similar).Server side pagination
should be turned on, in the Table widget.onPageChange
should be set to run this Firestore query.