Search Replace for Place Notes?

is there a way to Search & Replace in place notes?
My notes came formatted from other software and contains “\<B\>:” which I would like to remove since RM doesn’t recognize that proprietary formatting. Search ALL find them (but there are many hundred to fix. Search & Replace places seems to only search the Place names and not the other fields.

Thanks!

No. This feature would need to be added.

I’m impressed that Find Everywhere finds things in Place notes because I comment regularly that Find Everywhere doesn’t actually find everywhere.

I also observe in passing that RM9’s implementation of Search and Replace actually includes a lot more categories of items which it can process than did RM7. So this is a nice new feature of RM9 that has been little noticed or praised. Unfortunately for your situation, Place notes are not one of the new categories of items which are supported by RM9’s Search and Replace.

Aside from fixing the problem one a time in Find Everywhere, there are only two other options that I can think of. One option would be to export your entire RM9 database to a GEDCOM file, make the changes in the GEDCOM file with a text editor, and then import the GEDCOM file back into a new RM9 database. I personally don’t recommend this option because there can be data losses with a GEDCOM export and import. The other option would be to run an SQLite script against your RM9 database. This particular script would be extremely trivial to write. But the use of SQLite scripts against RM databases is not supported or recommended by RM because of the risk of data loss or structural damage to your RM database. Well, the third option is to request a future enhancement to RM and to wait for an enhancement that might or might not ever come to pass.

Finally, if you did decide to fix the problem with GEDCOM or SQLite, or if RM adds the feature to support Search and Replace for Place notes, you might be able to keep your bold text. All of RM’s notes do support <b>…</b> tags to mark the beginning and end of bold text. So you might be able to convert the bold tags from the imported data to RM style bold tags. And of course just getting rid of the bold tags is also a perfectly reasonable approach.

Yes I will probably need to update via SQLITE via update query & replace chars with space then.
Just wondered if I missed something available in RM. I suppose it makes sense from a development POV to not do search and replace on notes

Kevin

Check out SQLite Tools for RootsMagic The site is not supported or endorsed in any way by RM. You will need to download an SQLite manager and also a fake RMNOCASE collating sequence. You can find help for doing that on the SQLite tools site.

Your script is going to look something like the following if you just want to get rid of the bold. It just replaces the bold tags with a null string. The script would be a little different if you want to try to keep the bold by converting it to RM style bold tags.

UPDATE PlaceTable
SET Note = REPLACE(Note,'<B\>', '');

Well, I can’t tell if the double quotes in your original message are also part of what you need to get rid of as well. If so, you will have to adjust my suggested script. I’m not sure off the top of my head if the double quotes would have to be escaped in some manner. The official SQLite delimiters for strings are single quotes, but SQLite also supports double quotes as delimiters for strings. So if you have to deal with the double quotes, you would have to research how best to do so.

If you have follow-up questions, please post them on the SQLite tools site. I’m probably putting too much about SQLite here myself.

Jerry

1 Like

agreed - do NOT want to get into to too much Sqlite here. And I have to deal with Quotes before in other SQL and sometimes that is frustrating . Thanks Again!

thanks I worked with a very slightly modified version of that that did the trick.
I found another issue in another note field that I will work manually now, as only about 20 hits and not working creating a script for that complexity.

1 Like

Another solution would be to use GEDPAD, a GEDCOM file editor that includes a “search” “replace” function.
The only limitation would be a possible loss of information by exporting to the GEDCOM file and then re-importing into Roots magic.

Jasper2

19h

Another solution would be to use GEDPAD, a GEDCOM file editor that includes a “search” “replace” function.

Yes – could do via GEDCOM but as you mentioned the loss from that and the GEDCOM loss would be undesirable. The Sqlite fix worked for me quite well.

Am I the only person who thinks that using RM to export to a GEDCOM and then importing that exact same GEDCOM back into RM causes data loss?

Why would this be?

1 Like

I do NOT know the specifics (maybe nobody really does). You can take the exact same GEDCOM and import into two different Application while the result may be close-- they will not usually be exact. Usually the export will not be exact either. due to many variables it would be hard to say exact what will occur when – but it would be interesting to know what to avoid and best practices

Hardly the only one. I’ve logged many types of losses at
https://sqlitetoolsforrootsmagic.com/gedcom-dnd-transfer-losses/
If you have identified any others, please report them here or there and I will verify them and update the page.

Why are there losses? Probably a combination of factors including lack of support in GEDCOM which would require the development of custom GEDCOM, how much customer demand there is for preservation, and how much effort it would take to fill the gap.

1 Like

If more companies allowed access to the database that might help. That is one of the reason I came to RM over FTM. Family Historian gives a new perfect version because it basically copies the tables (other than shared facts which it makes them un-shared when bringing over… such as CENSUS). (Using RM import vs Gedcom import ) however when I imported it back to RM – I had several issues.

Kevin

It is a well know problem. GEDCOM export from RM and import into RM does not always lose data, but it can. See GEDCOM & DnD transfer losses An important new item that is lost on GEDCOM transfer is that RM9’s new Associations feature is not supported by RM’s GEDCOM.

There is no guarantee that RM will always lose data on a GEDCOM export/import. Indeed, for many users it may well be the case that a GEDCOM export/import will not lose any data. But the strong possibility is always there.

I strive not to use the data items and features that don’t transfer readily. The problem typically is much worse when transferring from RM to some other software, but the problem can happen even when transferring from RM to RM. For example, I don’t use Place Details. Place Details do transfer from RM to RM and they do transfer from RM to some other software. But they don’t transfer from RM to familysearch or ancestry. Similarly, I minimize my use of RM’s shared facts for the same reason. I strive not to have any unused data items, so I’m not bothered that they don’t transfer.

For the purposes of assisting with my conversion from RM7 to RM9, I created for my own use an SQLite script that does a table by table and row by row comparison between an RM7 database and an RM9 database. My script only compares tables that are important to me and it makes adjustments for differences between the RM7 and RM9 databases. With those caveats, my script reports no differences between RM7 and RM9 databases immediately after an import from RM7 to RM9. That is to be expected. My script also reports no differences between RM7 and RM9 databases after running an SQLite script by Tom Holden that reverts an RM9 database to RM7. So far, so good.

My script also reports no differences between RM7 and RM9 databases after manually typing the exact same information into both databases if I’m very careful to make sure what I type is exactly the same each time. If I export GEDCOM from RM7 and import the GEDCOM into RM9, my script basically reports few differences or no differences. I do get one difference that initially was a little puzzling. The difference is that there can be a difference in the child order within a family. RM has more than one way of encoding child order within a family, and after a GEDCOM import the children may be in the correct order but RM’s internal encoding of the child order can be different. But be aware that the only reason that my script reports so few differences after a GEDCOM export/import is that I’m so careful not to use any RM features that aren’t supported by GEDCOM export/import between RM and RM.

Well, if this is the case, then the assumption has to be that there IS going to be data loss.

1 Like

@kevync1985, sorry, late to the party again…

Have you tried using the Search and replace option accessed from the 3 dots in the top right hand corner of the Search tool?

image

image

EDIT:
on further analysis, it would appear that Search and replace does not support Place notes.

1 Like

Thank you – I forget exactly how I resolved – I did most from within RM.
Also did some via SQL.

Kevin

Just an observation. Since a GEDCOM export leaves the source database unaltered… there can be no data loss(es) during subsequent GEDCOM import.

If there were any data losses, they would not be in the original database. The data losses would be in the newly created database into which the GEDCOM was imported. Although the original database would not be altered, it also would not include any of the fixes from editing the GEDCOM.

Sorry about that, thejerrybryan. This old brain saw the phrase “back into” and leapt right past the word “new”.

Funnily enough, the “fixed” notes from GEDCOM import do get incorporated, but are appended after the original Place Note. Again, my apologies for the oversight. Both features need extension. GEDCOM in/out without data loss -and- extension of search & replace.