* Find and Replace for in Source Notes [Solved]
Find and Replace for in Source Notes [Solved]
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.
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
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- 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
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."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
Re: Find and Replace for in Source Notes
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.
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 (121.33 KiB) Viewed 7094 times
Mike Loney
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- 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
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!
Make a copy of your ged file first, just in case!
David Miller - researching Miller, Hare, Walker, Bright (mostly Herts, Beds, Dorset and London)
- 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
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.
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
Re: Find and Replace for in Source Notes
David,
Yes I did think of that (I use Geany, which is also ideal for writing LUI plugins) but felt it too much hassle. I was really after a better way of doing it in FH!
Mike
Yes I did think of that (I use Geany, which is also ideal for writing LUI plugins) 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
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- 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
When I search using the standard find and replace it finds have image just fine
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
Re: Find and Replace for in Source Notes
Mike,tatewise wrote: However, for me Edit > Find and Replace works with Notes ticked, so don't understand why it does not work for you.
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
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
- DavidNewton
- Superstar
- Posts: 464
- Joined: 25 Mar 2014 11:46
- Family Historian: V7
Re: Find and Replace for in Source Notes
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
David
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
- 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
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.
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
- DavidNewton
- Superstar
- Posts: 464
- Joined: 25 Mar 2014 11:46
- Family Historian: V7
Re: Find and Replace for in Source Notes
My mistake. I misunderstood the question and thought the idea was to remove the duplicates, keeping one.
David
David
Re: Find and Replace for in Source Notes
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 However, I'll be more careful next time, now I know it definitely works!
Thanks
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 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
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com