Help me update my firestore document

My first retool project

I have a connection, my tables are bound to the firestore documents. The values in the script to appear to fire correctly.. here's my code

console.log(Trips.selectedRow.data.total_reserved );
Trips.selectedRow.data.total_reserved = numBooked;
console.log(Trips.selectedRow.data.total_reserved );
Trips.recordUpdates

My script returns 1 in the console log, which is the firestore document value.
Then it returns 3 (which is my numBooked value which I set the total_reserved to)
The script runs with no errors, but in Firestore, the documents not updated.

Is there something else I need to do to change the value of the field and write it to the document?.

thanks !

Hello @aaronburnlab,

You would need to write a query that would send/write this updated value into Firestore.

And if you would want to get this new data reflected on your table, then you might have a "success event handler" query that reloads the table data with new data from Firestore.