CTRL+Z, Undo function

I can’t believe this has not been brought up before. If it has I could not find it.

Let me tell you one of the most annoying things that drives me crazy that I think should be added to the software.

The CTRL+Z, the undo function.

I don’t know how many times I have gone into the persons file and by mistake deleted the first name of the person and could not use the undo function to bring it back.

2 Likes

It’s not that Ctrl+Z doesn’t exist. Rather, it’s that Undo doesn’t exist. Usually, Ctrl+Z is just one of several ways to do an Undo, but if there is no Undo then there is nothing for Ctrl+Z to do.

RM saves as it goes rather than saving at the end of a session. Indeed, there is not a Save at the end of a session. You just close out RM. It’s not that the close out does a Save. It doesn’t. It simply means that everythig has already been saved.

That doesn’t necessarily make an Undo impossible, but it makes it very difficult. Even so, an Undo has been a much requested feature for RM through the years.

3 Likes

Comment directed @Attroll

Software like FTM does have an Undo type feature — it keeps a log of changes to “fix” them .
That sounds rather simple on principle - but not as simple to implement / execute

Certainly a “undo” of say the last few changes (for most things) would be welcomed.

I am sure all of us have had an “oh crap” moment where we did something we didnt mean to at the time.

1 Like

https://community.rootsmagic.com/search?q=ctrl%20%2B%20z

https://community.rootsmagic.com/search?q=undo

And oft-requested and discussed in the Forum that predates this one…

1 Like

Whenever the Save button appears there is also a Cancel button. That is when you can return to its previous state.

2 Likes

I don’t recall ever seeing a save button in this circumstance.

I am referring to the example attached. I have on a few occasions (more than I care to admit) highlighted the person first name when going into a record and started typing. Then the issue is, I realized it and caught myself, but I forgot what the persons first name was, or I did not see it before I started typing.

This leaves me digging through paper records that I have trying to find out what the persons first name was. This is very, very aggravating. This is where the undo function would come in real handy, at least for me.

The screen in your attached image is the Edit Person screen. Firstly, in order for the Given name to have become highlighted like that, you had to have explicitly done so. RM does not highlight by default. Additionally, if you had just clicked into that block, no highlighting occurs and the cursor just lands where you clicked. Double-click does the full highlight.

Proceeding to the state you describe… if you delete one, some or all the characters, two icons appear at the top right of that pane to indicate a change has been made. A checkmark icon to click for saving the change or a circle with a line thru it to Cancel the change. But note… the Richard Michael (at the top of that pane) does not change (even if it did the information in the left pane is still there to figure what was in the Given name), so there’s always a place you can refer to restore what you deleted.

2 Likes

Ah, thank you for pointing that out. That was of great help. Thank you, thank you.

Having an Undo (ctl-Z) function within a field is absolutely standard in all software I’ve seen. It’s got to be built into the tools RM Inc is using to create RM. Every GUI form creation tool I’ve used from Microsoft had it built-in to the created text entry fields.

This is not the same feature request as a database change undo function.
That is much more difficult. That is what the post’s respondents are talking about when they say “RM saves as you go”.

The Note editor has Undo, there is no reason that the field editors don’t have an undo.

The note editor looks to be more specialized to support text formatting / search / dedicated cut and paste, thus the form creation tool.

The other fields of that upper pane may possibly be using something along the lines of SQLite’s convention of a prepared statement object. Bind a value to a parameter, execute (step thru) the SQL statement to write to the db, loop to reset the prepared statement (for reuse) to allow for the next binding of a new (or changed) value to a parameter.

It’s beginning to feel to me as if two different issues are becoming conflated. Issue #1 is that RM doesn’t have an Undo function. That remains true no matter what the discussion is about a Checkbox icon and a Cancel icon. After you click the Checkbox icon, there is no Undo. The Undo function is the real need.

Issue #2 is that there is often but not always a Checkmark icon for save and a Cancel icon for don’t save in the Edit Person screen. Those icons are pretty consistently there as long as you are in the main Edit Person screen. It gets iffy whether they are there are not if you are doing data entry that involves sliding additional data into the right hand panel of the Edit Person screen.

The Checkmark icon and the Cancel icon both do work when they appear in the Edit Person screen. However, I have a strong tendency not to use them. In particular, RM is already way too clicky. Always using the Checkmark icon to save would just aggravate that clickiness. So I avoid the Checkmark icon by clicking the Close box of the Edit Person screen or by clicking on one of the facts in the left hand panel of the Edit Person screen. This latter action has the added advantage of unsliding however many slides I had to do in the right hand panel, all in one go, while still leaving me in the Edit Person screen. Either the Close of the Edit Person screen or the clicking of a fact in the left hand panel will automatically do any pending saves that were there in the right hand panel.

I recently had the unfortunate experience of merging two people in error in my RM 10 database. RM Support told me this could not be undone, but that I could drag and drop from my last backup to restore the records into the current database. Support was unable to describe to me exactly how to open both files at the same time in order to drag and drop, so I had to figure it out by myself:

  1. Close the current “bad” RM 10 database (containing the record merged in error) without backing it up.
  2. Go to Windows Explorer and rename that “bad”database to some other name.
  3. Return to RM and Restore the prior backup, made before the error. This is now the “good” database.
  4. Open the newly renamed “bad” database in RM.
  5. Delete the Person record merged in error from the “bad” database.
  6. Go to the “good” database and drag the two original unmerged records into the “bad” database. This is now the “repaired” database.
  7. In RM, backup and close the “repaired” database.
  8. Close the “good” database.
  9. Open the “repaired” database to make sure the two records that had been initially merged in error are now fully restored. Close that database without backing it up.
  10. In Windows Explorer, rename the “repaired” database back to its original name.
  11. Open the newly renamed “repaired” database, then back it up and close it.
1 Like

Ah, the devil is in the details and nobody ever seems to want to deal with those pesky details. As you discovered, the problem is that an RM restore by default restores to the same folder and to the same file name. That has the effect of destroying your current data. If you are truly intending to do a real restore to get back to where you were yesterday or an hour ago or whatever, then just do the restore. But if you are doing the restore so you can recover a small bit of data from the backup file without destroying your current data, then you can’t “just do the restore”. You need a workaround. Your workaround is fine, and indeed is very clever.

When you do a restore, you cannot restore to a different file name, and that is the root cause of the problem of how hard it is to recover small bits of data from a backup. But what you can do on a restore is to restore to a different folder. That’s usually the recommendation given by RM support, and I’m surprised they didn’t recommend it in this case. I’m not sure that’s any easier or any better than the way you did it, but it does seem to be the conventional recommendation.

I really wish it were possible to restore to a different file name. That would be the optimum way to be able to recover small bits of data from an RM backup file. But I fear it would be hard to restore do a different file name. The reason is that an RM backup file is an *.zip file in disguise. A restore simply does an unzip. And the technology of the zip format does not include a renaming of the file during an unzip.

Actually, I was curious just now and asked ChatGPT if it is possible to extract a file from an *.zip file while renaming the extracted file. The answer was “no” when using the basic unzip technology of the zip format. But it is possible when using tools or code. So it appears to me that RM actually could implement a rename during the restore if they wished to do so.

Here follows the text of my interaction with ChatGPT.

You could do the “Rename” within RM by using File>Tools>Move/Rename.

1 Like

i think i did a search for this, too, not long after i started using RM. its absence conjures up bad memories of accidentally deleting stuff in access databases.

Correct. Most databases for the home computer market have the same issue. They save as they go and they do not utilize a transaction log. Therefore, they do not have an Undo feature. I don’t claim that there is no database for the home computer market that has an Undo function, but I’m not aware of one off the top of my head.

I wonder how Family Tree Maker developed its Undo feature for its SQLite database - same engine as has RM. It is some kind of log - I think FTM2019 had a limit of 1000 changes, expanded I believe for FTM2024. SQLite does create a transaction log on the fly (journal or WAL file) to revert the transaction if it fails to complete. Could they have built something around that or do they independently track all the commands issued to SQLite?

If one developer could build an Undo feature for an application that uses SQLite, then another developer could do so for a different application that uses SQLite. But a general Undo feature within SQLite might be a very different matter, probably intractable.