# Update a list of documents

This action allows you to edit/update multiple documents in a Firestore collection at once, by running a firebase-admin instance on Bubble's backend.

***

## <mark style="color:blue;">Inputs and Settings</mark>

<div align="left"><figure><img src="https://284736847-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiWu3FezEjWxrPbkf8zIP%2Fuploads%2FOfW5Nv8hVYYOZ3UXHWNM%2Fimage.png?alt=media&#x26;token=11e7c406-5615-4c0b-84d9-1d8b087251b4" alt=""><figcaption></figcaption></figure></div>

### Documents IDs (list)

The list of IDs of the documents you want to update.

### Collection

The name or ID of the collection the documents you want to update are stored in.

### Fields

You must inform which fields you want to update, in JSON format. This input allows you to set as many fields as you want.

For each field you must specify the "key" and the "value" that will be stored on it. For instance, you might want to check all tasks on our [task manager sample app](https://estare-plugin-firestore.bubbleapps.io/version-test), by changing the "done" field to "true". You'd need to define the "key" = "done" and the "value" = "true".

<div align="left"><figure><img src="https://284736847-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiWu3FezEjWxrPbkf8zIP%2Fuploads%2FOSgii6n9xhLOSZxLQVM3%2Fimage.png?alt=media&#x26;token=10ec6ce8-3c30-4fb7-8772-dd3f24147d06" alt=""><figcaption></figcaption></figure></div>

### Field Types

For each key/value pair you define and provide a value on the Fields list, you must provide the same key, but with the type of the value, on the Field Types input. That allows the plugin to turn the texts being fed into the plugin into corresponding values on the JSON structure sent to Firestore.

If the number of Fields and Field Types don't match, the action will result in an error.

<div align="left"><figure><img src="https://284736847-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiWu3FezEjWxrPbkf8zIP%2Fuploads%2FqjLv504UI1CTGKNprc1Z%2Fimage.png?alt=media&#x26;token=4cc722ce-2b3e-4a45-9198-efaa0630b01a" alt=""><figcaption></figcaption></figure></div>

See the [field types table](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-front-end-actions/field-types-table) to see which types are currently supported by the plugin and how to define them.

***

## <mark style="color:blue;">Returned Values</mark>

This action returns no values, since batch operations on firebase-admin don't return the document information.
