* Find and Replace for in Source Notes [Solved]

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
Gowermick
Megastar
Posts: 1703
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Find and Replace for in Source Notes [Solved]

Post by Gowermick »

After an exercise in tidying my Source Records, a lot of them now have duplicated entries in the Note field.
For example, where I had 'Have Image' in a Source Note, after combining them, somehow the single entry now contains
'Have Image Have Image Have Image...', the number of repeats dependant upon how many citations used the Source.

Is there a way of using Find and Replace to remove this unwanted text e.g. Find 'Have Image', Replace with '' ?

I tried ticking the 'Note' option in Find and Replace, but that seems to be restricted to Individual notes. I can do it manually, but thought there must be a better way.
Last edited by Gowermick on 13 Aug 2018 09:57, edited 1 time in total.
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
User avatar
Jane
Site Admin
Posts: 8514
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Find and Replace for in Source Notes

Post by Jane »

If might be helpful to go to the All tab for the source and open all the branches and post a screen shot for us, I suspect the "repeats" are actually in multiple notes or perhaps in the Text from Source field?
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
Gowermick
Megastar
Posts: 1703
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Find and Replace for in Source Notes

Post by Gowermick »

Jane,
Sadly not.
I think in the early days of FH, moving from FTM, I ran a few 'Tidy Up' routines, and whereas I had multiple copies of a source, each containing a single 'Have Image' in note field, after tidying up, I had one source, but multiple copies of 'Have Image', one from each of the original sources.
As you can see from the screen-shot, I only have one Note field.

I am removing the Notes manually, but looking to see if, in principle, one could use 'Find and Replace' in source Note fields.
Attachments
Source Text.jpg
Source Text.jpg (121.33 KiB) Viewed 7094 times
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
User avatar
davidm_uk
Megastar
Posts: 740
Joined: 20 Mar 2004 12:33
Family Historian: V7
Location: St Albans, Hertfordshire, UK

Re: Find and Replace for in Source Notes

Post by davidm_uk »

You could always edit your ged file with a text editor (eg Notepad), and use the replace function there. Of course you'd have to be careful if you have the 'Have Image' text anywhere else.

Make a copy of your ged file first, just in case!
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)
User avatar
tatewise
Megastar
Posts: 28410
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Find and Replace for in Source Notes

Post by tatewise »

Assuming they are all multiple Have Image entries, use the Search and Replace Plugin, where on Extra Filters you can specifically select Note fields for Source (SOUR.NOTE).

However, for me Edit > Find and Replace works with just Notes ticked, so don't understand why it does not work for you.

Yes, you can edit GEDCOM but that is fraught with risks.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Gowermick
Megastar
Posts: 1703
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Find and Replace for in Source Notes

Post by Gowermick »

David,
Yes I did think of that (I use Geany, which is also ideal for writing LUI plugins) :D but felt it too much hassle. I was really after a better way of doing it in FH!

Mike
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
User avatar
Jane
Site Admin
Posts: 8514
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Find and Replace for in Source Notes

Post by Jane »

When I search using the standard find and replace it finds have image just fine
2018-08-13_095338.jpg
2018-08-13_095338.jpg (33.17 KiB) Viewed 7087 times
2018-08-13_095311.jpg
2018-08-13_095311.jpg (93.64 KiB) Viewed 7087 times
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
avatar
Gowermick
Megastar
Posts: 1703
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Find and Replace for in Source Notes

Post by Gowermick »

tatewise wrote: However, for me Edit > Find and Replace works with Notes ticked, so don't understand why it does not work for you.
Mike,
I tried Find again, with Notes ticked and this time it DID find them. I must have been too impatient the last time I tried, as everything but Census types showed up!
I'll now try the Find and Replace again, and see what happens.

Update: Although Find found the 'Have Image' note in source note field, 'Find and Replace' made '0' replacements! (one for Calico Pie?)
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
User avatar
DavidNewton
Superstar
Posts: 464
Joined: 25 Mar 2014 11:46
Family Historian: V7

Re: Find and Replace for in Source Notes

Post by DavidNewton »

Try the following settings in the Search and Replace plugin - ignore the vertical cursor after the * I missed it when I took the screen shot
HaveImage.JPG
HaveImage.JPG (78.35 KiB) Viewed 7082 times
The pattern matches all note beginning with "Have Image " and replaces them with "Have Image". If it doesn't do what you expect then undo the plugin updates.

David
User avatar
tatewise
Megastar
Posts: 28410
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Find and Replace for in Source Notes

Post by tatewise »

Not sure it is one for Calico Pie, because both Jane and I can Find and Replace exactly that text OK.

David's solution is a variant method, but does not need LUA Pattern Mode.
A simple Plain Text Mode search for Have Image with blank replace will work just fine.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
DavidNewton
Superstar
Posts: 464
Joined: 25 Mar 2014 11:46
Family Historian: V7

Re: Find and Replace for in Source Notes

Post by DavidNewton »

My mistake. I misunderstood the question and thought the idea was to remove the duplicates, keeping one.

David
avatar
Gowermick
Megastar
Posts: 1703
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Find and Replace for in Source Notes

Post by Gowermick »

Mike,
Following on from your comment that Find and Replace worked for you, and having deleted all 'Have Image' notes manually, I re-entered one or two to test Find and Replace again, and it did work! It even updated the source record list I had open as it went, without need for a refresh.

I can only assume human error on my part :oops: However, I'll be more careful next time, now I know it definitely works!

Thanks
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Post Reply