A lot of users actually use a JS loop & an updateOne query type.
You'll start with a JS query that maps through your .recordUpdates and triggers a new updateOne query for each row (You'll replace id and sales with the values in your table. You'll also want to replace table5 and updateOne with your table name & update query name):
Hi @osirisfrik Hmm, that is strange From what I can tell, this looks to be set up correctly. Are you triggering this on the save changes button in the table?
Can we expand those items in the Retool debug console to see the exact values that are sent from saveChanges to updateOne? (i.e. how was additionalScope defined)
I'd also be curious if hardcoding some values works -- just to confirm there isn't a syntax issue
For example, changing {{_id}} to a hardcoded _id & changing {{readableCode}} to a hardcoded value
Oh right! Thanks for calling that out. I think we're working on some linting to make that more noticeable. Hmm, if you put those values into the updateOne query by hardcoding them, does it also not update?
How are you confirming that the values aren't updating? Are you calling a get request in Retool?
Hello, I have tried these steps but my mongo db instance still doesn't reflect the changes. Also the read lines beneath the params you are passing, isn't that the sign of an error. Please forgive me, I am new to Retool @Tess
Hi @oyinda_david can you share some screenshots? The mongo query will have red lines for the params you're passing in because the values are not defined yet. They'll be defined when you run the JS query
Hello @Tess thank you for your explanation. I didnt understand the earlier explanations, but its clear now. I have been able to update multiple rows in the mongoDB