> For the complete documentation index, see [llms.txt](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-front-end-actions/field-types-table.md).

# Field types table

The table below contains (1) the keywords you should use in actions that require you to define field types and (2) a description of how they will be interpreted and in which format you should provide data to avoid inconsistencies.

Since all data must be provided as text, the plugin will convert this text into a "type" based on the keywords you use.

We left more than one keyword for each type, in order to help no-codes to choose terms they're more familiar with.

<table><thead><tr><th width="244">Keywords</th><th>Description and how to format the value</th></tr></thead><tbody><tr><td>boolean<br>bool</td><td>Turns "0", "no" and "false" texts into a boolean value of <mark style="color:purple;">false</mark>, and turns any other values into the boolean value of <mark style="color:purple;">true</mark>.</td></tr><tr><td>text</td><td>Treats the entry as a simple text field.</td></tr><tr><td>number</td><td>Tries to convert the value into a number. Will result in error if it's not possible and won't store the value.</td></tr><tr><td>date<br>timestamp</td><td>Tries to convert the value into a datetime value. Best practice is to use ISO Format provided by Bubble's date formatter <br>(<mark style="color:purple;">2023-12-14T00:00:00.000Z-03:00</mark>)<br><img src="/files/QKEDsy1FF5Cms8IJe5vX" alt=""></td></tr><tr><td>map<br>json<br>array<br>list<br>object<br>json object</td><td>Tries to convert the text into a JSON object, that will be stored as a Map or Array type on Firestore. If the conversion fails, it won't store the value.<br>Sample Array: <mark style="color:purple;">["text1", "text2", "text3"]</mark>.<br>Sample Map: <mark style="color:purple;">{"prop1": "text1", "prop2": 10, "prop3": "text3"}</mark><br>This only supports texts or number types on the JSON structure.<br><br>You can also construct Maps by using dot notation, which allows you to define more types. For instance, you can store a "date" on the key "<mark style="color:purple;">log.date</mark>" and it will store a Map <mark style="color:purple;">{"date": date_value}</mark> on the "log" field.</td></tr><tr><td>reference</td><td>Tries to create a document reference from a path given as text.<br>For instance: <mark style="color:purple;">users/doc_id</mark> will be turned into a reference to the users collection, to the document of ID "doc_id".<br>For subcollection, you only need to provide the full path: <mark style="color:purple;">users/doc_id/subcollection/sub_doc_id</mark>.</td></tr><tr><td>reference list</td><td>Tries to create an array of references from a list of paths provided as strings. <br>It is important to provide the list as an javascript array. For instance: <mark style="color:purple;">["users/doc_id1","users/doc_id2","users/doc_id3"]</mark></td></tr><tr><td>add to list<br>add item to list<br>add list<br>list add</td><td>Tries to add a value or an array of values to a list field <mark style="color:purple;">as texts</mark>. If the field was not of type array, it will be turned into one.<br>Sample: <mark style="color:purple;">["text1"]</mark> or <mark style="color:purple;">text1</mark> will add "text1" to an array.</td></tr><tr><td>remove from list<br>remove item from list<br>remove list<br>list remove</td><td>Tries to remove a value or an array of values form a list field.<br>Sample: <mark style="color:purple;">["text1"]</mark> or <mark style="color:purple;">text1</mark> will remove "text1" to an array.</td></tr><tr><td>list add number<br>add number to list<br>add number list<br>add list number</td><td>Tries to add a <mark style="color:purple;">number</mark> or an <mark style="color:purple;">array of number</mark> to a list field. If the field was not of type array, it will be turned into one.<br>Sample: <mark style="color:purple;">[123]</mark> or <mark style="color:purple;">123</mark> will add the number 123 to an array.</td></tr><tr><td>list remove number<br>remove number to list<br>remove number list<br>remove list number</td><td>Tries to remove a <mark style="color:purple;">number</mark> or an <mark style="color:purple;">array of number</mark> from a list field.<br>Sample: <mark style="color:purple;">[123]</mark> or <mark style="color:purple;">123</mark> will remove the number 123 to an array.</td></tr><tr><td>list add date<br>add date to list<br>add date list<br>add list date</td><td>Tries to add a <mark style="color:purple;">date</mark> or an <mark style="color:purple;">array of dates</mark> to a list field. If the field was not of type array, it will be turned into one.<br>Sample: <mark style="color:purple;">["2024-02-21T00:00:000Z"]</mark> or <mark style="color:purple;">2024-02-21T00:00:000Z</mark> will add this date to an array.</td></tr><tr><td>list remove date<br>remove date to list<br>remove date list<br>remove list date</td><td>Tries to remove a <mark style="color:purple;">date</mark> or an <mark style="color:purple;">array of dates</mark> from a list field. If the field was not of type array, it will be turned into one.<br>Sample: <mark style="color:purple;">["2024-02-21T00:00:000Z"]</mark> or <mark style="color:purple;">2024-02-21T00:00:000Z</mark> will remove this date to an array.</td></tr><tr><td>list add map<br>add map to list<br>add map list<br>add list map<br>list add json<br>add json to list<br>add json list<br>add list json</td><td>Tries to add a <mark style="color:purple;">map / json</mark> or an <mark style="color:purple;">array of maps / jsons</mark> to a list field. If the field was not of type array, it will be turned into one.<br>Sample: <mark style="color:purple;">[{"message":"Hello","id":1}]</mark> or <mark style="color:purple;">{"message":"Hello","id":1}</mark> will add this json string as a map type to an array field.</td></tr><tr><td>list remove map<br>remove map list<br>remove list map<br>list remove json<br>remove json list<br>remove list json</td><td>Tries to remove a <mark style="color:purple;">map / json</mark> or an <mark style="color:purple;">array of maps / jsons</mark> from a list field. If the field was not of type array, it will be turned into one.<br>Sample: <mark style="color:purple;">[{"message":"Hello","id":1}]</mark> or <mark style="color:purple;">{"message":"Hello","id":1}</mark> will remove this json string as a map type to an array field.</td></tr><tr><td>list add reference<br>add reference to list<br>add reference list<br>add list reference</td><td>Tries to convert a list of paths into a list of references to be added to a list field on a document.<br>Sample: <mark style="color:purple;">["users/doc_id1", "users/doc_id2"]</mark> will be added to the list as 2 references to documents on the users collection.</td></tr><tr><td>list remove reference<br>remove reference from list<br>remove reference list<br>remove list reference</td><td>Tries to convert a list of paths into a list of references to be removed from a list field on a document.<br>Sample: <mark style="color:purple;">["users/doc_id1", "users/doc_id2"]</mark> will be removed from the list.</td></tr><tr><td>geopoint<br>location<br>geographic location</td><td>Tries to convert a latitude and longitude into a GeoPoint reference to be stored on Firestore.<br>Sample: <mark style="color:purple;">40.6976312,-74.1444872</mark> (lat,lng) will store a reference to New York on a GeoPoint type field.</td></tr><tr><td>delete<br>delete field</td><td>Deleted a field from the JSON structure on the document. This tyep does not require any value. If one is given, it will be ignored.</td></tr><tr><td>increment</td><td>Increments a number field by the specified value.<br>Sample 1: <mark style="color:purple;">2</mark> will add 2 units to a numeric field.<br>Sample 2: <mark style="color:purple;">-1</mark> will subtract 1 unit from a numeric field.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-front-end-actions/field-types-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
