Trying to to Update my Firestore Database - Javascript Error

Hello!

I am having trouble setting updates from Retool to my Firestore Database. I keep getting this error:

Value for argument "data" is not a valid Firestore document. Input is not a plain JavaScript object.

Any Suggestions?

Hey @Dev_Tejwani!

How does {{table2.changesetObject[table2.selectedRow.id]}} work?

It looks like Firebase is expecting an object that just has key-value pairs for the fields you're looking to update. If you reference table2.changesetArray that will be an array of all the changes made to your table, instead of just the changes for the selected row. Using changesetObject is nice because it lets you grab the changes based on row id.