Page 1 of 1

Search and Replace version 3.3 strange result

Posted: 31 May 2021 11:16
by johnhanson
I moved some addresses into the first part of the place field using the place/address plugin which of course leaves spurious codes - well documented and even has a suggestion for removing them using the Search/Replace plugin

I have tried that and even though the result says that it has done it when I run the "work with places" again it is still there - what amm I doing wrong? I notice that the Search/Replace has a close on the bottom and notice that having run the script to remove things

This is the result of the search/replace
Seaarch-Replace.jpg
Result of search/replace
Seaarch-Replace.jpg (184.5 KiB) Viewed 1994 times
This is the screen showinig what I ran
Sp-Script.jpg
Sp-Script.jpg (124.48 KiB) Viewed 1994 times
Having run it again the screen does not re-appear after it finishes so I can't close the plugin and wonder if that is the issue.

I have checked all open screens to make sure that it isn't lurking behind somewhere

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 11:49
by tatewise
Sorry John, I have to admit to being mystified. I've run the same scenario and it works as expected.

What is most odd is your screenshot of the Result Set on completion of the 'Search and Replace' plugin.
The Old Value and New Value columns are correct but the Record Name column shows the old value, not the new value.
I can only get that if I use Edit > Undo Plugin Updates.

Also, can you explain why the 'Search and Replace' plugin still seems to be 'Running' in that screenshot?
The Result Set cannot be produced until it has stopped running and automatically closes.

You say: Having run it again the screen does not re-appear after it finishes so I can't close the plugin.
Which screen does not re-appear?

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 12:43
by tatewise
I have performed some more test runs and found one occurrence where despite what the Result Set says, the prefix has not been removed from one Place Record.
Let me investigate why.
Trying to repeat the symptoms is proving more difficult than expected, as sometimes it does and sometimes it does not.

I think I have a possible explanation.
For all those Places that should be , , X, Y, Z but retain their prefix, was there already a Place named , , X, Y, Z such that after removing the prefix two Place records would have the same name?
That would inhibit removal of the prefix.

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 16:10
by johnhanson
Mike
Happy to let you have a copy of the gedcom if it will help
Regards
John
ps Sorry been out with family all day

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 16:29
by tatewise
Don't worry I've been out with friends all afternoon.
I don't need the GEDCOM but a view of some Place records shown in the Records Window on the Paces tab will help.
Are there entries for , , , London, England or , , Bexley, Kent, England or any others shown under New Value?
i.e. They conflict with that New Value after the Old Value has its prefix removed.

So before running Search and Replace there are entries for:
, , , London, England
{JP0}, , , London, England
, , Bexley, Kent, England
{PX0}, , Bexley, Kent, England

Then when {JP0} and {PX0} are removed there would be pairs of Place records with the same name.
That is not allowed, so FH reverses the change and puts the prefix back.

That is something that the Search and Replace plugin could potentially detect and warn against.

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 16:35
by johnhanson
OK Mike
I will have a tidy up and then try again
Does make sense

Thanks again

Regards
John

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 18:36
by johnhanson
Having had a good look at the offending entries it would appear that they all had a "use count" of zero and the vast majority had other entries

So I took the plunge and deleted all the place with a 0 use count - happy bunny now

Thanks Mike and next time I'll do some house keeping inbetween rather than try and do things one after the other

Might work some times but not always

Regards
John

Re: Search and Replace version 3.3 strange result

Posted: 31 May 2021 18:50
by tatewise
Thank you for the feedback John.
Yes, after using the Rearrange Place and Address Parts plugin there usually needs to be a tidy-up of Place records.