mark rows for deletion

I’ve tried three separate ways to mark rows for deletion. The action has “row(s)” with (s). I’m assuming it’s supposed to mark all rows in the model for deletion. I only get the first row to be marked for deletion.

1. Show Popup followed by action to mark row(s) for deletion.
2. Global action to mark row(s) for deletion.
3. Model action of requeried, the mark row(s) for deletion.

All do the same. Only first row is marked.

I think I need a snippet for this. Seems like the “Mark row(s) for Deletion” works on the first row in a model or all selected rows in model.

Pat,  I’m sure there is a deeper issue going on here - but why are you not using the mass action  “Flag Selected Rows for Deletion”  that is applied by default when you create a new table in edit or read/edit mode? 

Pat, you are correct — the “Mark row(s) for Deletion” action type currently only marks the following as deleted, based on the calling context:

1. Table Mass Action — marks all selected rows for deletion
2. Table Row Action — marks the context row for deletion
3. Table Global Action / Page Title action — marks the first row in the Model for deletion.

So the only place where this behavior does not make sense is the Table Global Action — I think we need to change the behavior here such that Table Global Actions would mark all rows for deletion by default. 


And/or add action “Select all rows in a model”

Yep this ‘delete all rows in a model’ action would be great.

Our use case is that as part of a ‘New Enquiry’, several rows are created in a model, related to the parent model. Sometimes users don’t want to retain the enquiry (say they’re just giving an estimate/verbal quote).

We want to give them the option to ‘not keep’ the enquiry, which means they need to delete rows in the child model first, and then the single row in the parent model.

Sounds right. 

As of the Banzai release, a Table Global Action that runs the “Mark row(s) for deletion” action will cause Allrows in the Model to be marked for deletion, rather than just the first row. 

The Action Framework in general will take all rows in a Model as its context rows if there is no context row or rows available.

Thanks Zach, just to clarify - does this mean that a ‘mark rows for deletion’ action built prior to Banzai will now behave differently?

ie - Tables have been built in prior versions where the action would only delete the row(s) which were selected - is that same action now going to select & delete ALL rows in the model?

Greg, only Table GLOBAL Actions’ behavior has changed. Table Row and Mass Actions’ behavior has not changed.

Prior to Banzai, a Table GLOBAL action that included a “Mark row(s) for deletion” action would mark the first row in the Model for deletion if there were NO selected rows. If there were selected rows it would mark those for deletion — that is not changing in Banzai. If there are selected rows, the selected rows will be marked for deletion — there’s no way to flag all rows for deletion in the Model if there’s selected rows. The only thing that is changing in Banzai is the behavior if there are NO selected rows at all in the table, and your Table GLOBAL action Marks row(s) in the Table’s same Model for deletion. Prior to Banzai, the firstrow in the Model would be marked for deletion. This was not very useful or intuitive — this was really a bug. In Banzai, a Table GLOBAL action that includes a “Mark row(s) for deletion” action will now mark all rows in the Model for deletion, but ONLY if there are NO selected rows in the Table. If there are selected rows, those will be marked for deletion, rather than all rows.

Pat as to your earlier suggestion, it would also make sense (in an upcoming release) for us to add a “Select all rows” action for the Table.

Thanks Zach.

Zach…should the mark rows for deletion work in pop up that has a reference to the model in a table?  I’m seeing that behavior where it only selects the first record.