Identify the rows flagged for mass deletion in Skuid JS Snippet to handle some functionality before model.save()

  • 1
  • Question
  • Updated 4 days ago
  • (Edited)
Is there a way to identify the rows flagged for mass deletion in Skuid JS Snippet to handle some functionality before model.save() which will delete the rows ?
Photo of Ebin

Ebin

  • 132 Points 100 badge 2x thumb

Posted 4 days ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 55,610 Points 50k badge 2x thumb
Yep, you can use model.isRowMarkedForDeletion(row) to check, e.g. if you want to get an array of just the rows marked for deletion you could do this:

var rowsMarkedForDeletion = model.getRows().filter(function(row) {
   return model.isRowMarkedForDeletion(row);
});


Photo of Ebin

Ebin

  • 132 Points 100 badge 2x thumb
Thank you Zach ! I have not tried this yet, I will come back when I do..