Delete a single field from an array of objects in Firebase

Each document you retrieve is a read. when you update the document its a write, just one for the whole document each time you update — not for one each array item.

1 Like

I was specifically replying to this sentence by Claudio:
“firebase does not allow the updating of the individual fields\row of a record but only of the entire record”.
One can update a single property within a document.
I do it with: SET_KEY(data.getProvider, "corpName", data.updProvider.corpName) in my update records flow function, where only the name of a corporate is updated.

Now, for updating within an array inside that same document, I did this little trick:
Create a specific schema in the data resource, just for this array. So if in your collection named “Collection” you have a document with a list of objects named “List”, you can create a standalone data resource whose Firestore collection name is “Collection”, with a list “List” of objects (all the properties of the array).
Then I use a similar formula in the update flow.
I can no longer show screenshots since I’m using a repeat for an entire input form now.

After reading your reply a little closer I realize it’s not quite correct. You can update fields in a document without re-writing the whole document. We are just not able to update individual array objects that we are aware.

ok ok … lots of inputs from these latest messages. I try to work out all this in my head, do some tests and if necessary, I return to the subject :slight_smile: thanks in the meantime …