Bulk Delete in SQL

I have a table with mult-select enabled and I would like to run a bulk delete action based on the id's of each selected row.
I know this is achieveable by iterating through and calling a query each time, but this is very inefficient when SQL could do this with one statement.
I can see that the bulk action has a feature whereby you can choose to Filter By a value which is IN a range. This seems to be made for this purpose but I am not sure of the best way to achieve this. Presumably I'd have to pull the id's from the table's .SelectedRow array, buy I'm not 100% how to get to this so maybe if someone could break it down for me that would help?

Thanks in advance!

Hey @dcsearle,

You're almost there. The value should be:

{{table3.selectedRow.data.map((i) => i.id)}}

Does that work for you?

1 Like

{{tblUpdateQueue.selectedRow.data.map(function(val){ return val.QueueID;})}}

Ha! I'd just done the above and got the same result but yours is much neater :slight_smile: Love it. Thanks @minijohn :+1:

1 Like