So I’m trying to create a multi-select delete documents query for a MongoDB database. I’ve added the checkboxes to a table that is connected to a simple get documents query.
Desired outcome:
I check several boxes and click a button. Upon clicking the button it fires the delete query, deleting all the selected rows from the MongoDB database.
This works great for a single row, but I just don’t know the appsmith syntax to have this query delete multiple rows. Is it a map function? I tried “selectedRows” as well, but my guess is some additional code would be needed for that. My js skills are getting better, but are still quite lacking.
@dancia The first query seems close. It still only works on a single row though. And according to the “evaluated value” preview, it’s only showing one _id instead of an array of them.