How to restore a row accidentally deleted

Hello :grinning: ,

"This row was subsequently removed in action {{action.actionNum}}"

I have this message , is it possible to restore the row from the “Document History” panel?
I really don’t see how I removed the row , is there another shortcut for that ?
And is it possible to see the “username” who did that , is there a way to see if it’s the API ?
Thanks

image

Hi! There is indeed a shortcut for removing rows, Ctrl+Delete (or Cmd+Delete on Mac). Also you can see shortcuts at Shortcuts - Grist Help Center or by pressing F1 or Cmd+/ in the product.

The {{action.actionNum}} seems like a bug, since it’s supposed to show an actual action number, which would be at least a little help in finding the action in Activity tab of Document History. (I reported the bug internally, so we’ll get it fixed.)

The Activity tab does show who made each action (note the checkbox to toggle whether to only see activity for the currently selected table or for everything). The history only goes over the last 100 actions or so. The Snapshot tab doesn’t have that level of detail, but has historical snapshots going back much further.

There isn’t a way to restore a row though, sorry. If it was just deleted, then Undo will work, of course. But otherwise, you’d need to find a previous snapshot that still has the row, copy it there, then paste into the current version.

1 Like

Hey there,

Have you figured out what happened? I experienced a similar scenario recently while editing a form field. Suddenly, I received a message indicating that the field had been deleted and an “undo” button appeared in the bottom right corner of the screen. However, when I clicked on it, nothing happened. I also tried using the “undo” button on the top of the screen, but still no luck.

In the end, I had to go to the history document to export the line and then re-import it again. Have you encountered this issue before? Let me know if you have any ideas on how to avoid it in the future.

Thanks

If you saw a toast like “You deleted 1 row. Undo to restore”, then Grist thought you were the one deleting the row (not some API call, say, or a collaborator).

Screenshot 2023-03-20 at 6.26.46 PM

The only way I can think of it happening without you noticing is if you unintentionally pressed the “Delete Row” shortcut, which is ⌘ Delete on Mac, or Ctrl + Backspace,Ctrl + Delete on Windows.

Grist initially asks for a confirmation when using these shortcuts, but once you tell it not to ask you again, it stops. You can re-enable the confirmation by opening the browser console, and typing in this command:

resetSeenPopups()

After this, try the keyboard shortcut to delete a record. You should see a popup asking “Are you sure you want to delete this record?”

Screenshot 2023-03-20 at 6.27.10 PM

This should make it harder to delete records accidentally.

1 Like

Thanks, @dmitry-grist!

It’s bizarre because I was actually typing in some text when this unfortunate event occurred. I don’t think the system could have captured “CTRL+DEL” when I was typing, though. Even with the undo button, I couldn’t retrieve the lost row. Maybe some supernatural forces were at play.

But on a serious note, I appreciate the popup suggestion, and I’ve reset everything now. Thanks a lot!:wink::+1: