Custom Action Delete Row

Hi, I can add a custom action to delete a row, rather than use the built-in delete. My reason for doing so is to log the delete to another table to save some of the information off, and record who deleted the record.

HOWEVER, I lose the ability to have a confirmation on the delete row action. There is a “show notification” but I don’t see any way to make the notification contingent confirm/cancel.

You’d have to set up two buttons — the first is a delete button that toggles a value. The 2nd button is only visible after the first button is pressed. Your delete row action would be on the 2nd button to act as a confirmation to delete.

3 Likes

So actually three buttons. One says delete, and then two pop up “Confirm / Cancel”?

Thank you, I will give that a go. My only concern is that if they leave the app that flag stays set and they will see the two buttons again the next time they come in. Not sure how to account for that.

Yes, sorry, one button and one button bar!

The way that I mitigate the issue of the field being chosen next time they enter is that I clear the value when they enter this screen initially (usually through an inline list action, for example). If this is your highest level screen, that may not be possible though.

1 Like

Well, I am using a floating button, so it worked best for me to add two additional floating buttons.

One thing I found is that if instead of confirm/cancel, I select the actions at the top to cancel or done, it clears the value for me! I am using a user-specific field as my flag so users do not interfere with each other.

Thank you again.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.