*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
Gowermick
Megastar
Posts: 546
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

Find and Replace for in Source Notes [Solved]

Postby Gowermick » 13 Aug 2018 07:51

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

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.0.5(x64), Firefox 61.0.1(64Bit) & Thunderbird 52.9.1
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
Jane
Site Admin
Posts: 7287
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Re: Find and Replace for in Source Notes

Postby Jane » 13 Aug 2018 08:17

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."

Gowermick
Megastar
Posts: 546
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

Re: Find and Replace for in Source Notes

Postby Gowermick » 13 Aug 2018 08:31

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 432 times
Mike Loney

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.0.5(x64), Firefox 61.0.1(64Bit) & Thunderbird 52.9.1
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
davidm_uk
Megastar
Posts: 719
Joined: 20 Mar 2004 12:33
Family Historian: V6.2
Location: St Albans, Hertfordshire, UK

Re: Find and Replace for in Source Notes

Postby davidm_uk » 13 Aug 2018 08:48

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: 14443
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Find and Replace for in Source Notes

Postby tatewise » 13 Aug 2018 08:52

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.

Gowermick
Megastar
Posts: 546
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

Re: Find and Replace for in Source Notes

Postby Gowermick » 13 Aug 2018 08:53

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

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.0.5(x64), Firefox 61.0.1(64Bit) & Thunderbird 52.9.1
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
Jane
Site Admin
Posts: 7287
Joined: 01 Nov 2002 15:00
Family Historian: V6.2
Location: Somerset, England
Contact:

Re: Find and Replace for in Source Notes

Postby Jane » 13 Aug 2018 08:54

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 425 times

2018-08-13_095311.jpg
2018-08-13_095311.jpg (93.64 KiB) Viewed 425 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."

Gowermick
Megastar
Posts: 546
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

Re: Find and Replace for in Source Notes

Postby Gowermick » 13 Aug 2018 09:06

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

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.0.5(x64), Firefox 61.0.1(64Bit) & Thunderbird 52.9.1
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

User avatar
DavidNewton
Superstar
Posts: 427
Joined: 25 Mar 2014 11:46
Family Historian: V6

Re: Find and Replace for in Source Notes

Postby DavidNewton » 13 Aug 2018 09:15

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 420 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: 14443
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Find and Replace for in Source Notes

Postby tatewise » 13 Aug 2018 09:19

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.

User avatar
DavidNewton
Superstar
Posts: 427
Joined: 25 Mar 2014 11:46
Family Historian: V6

Re: Find and Replace for in Source Notes

Postby DavidNewton » 13 Aug 2018 09:28

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

David

Gowermick
Megastar
Posts: 546
Joined: 13 Oct 2015 07:22
Family Historian: V6.2
Location: Swansea

Re: Find and Replace for in Source Notes

Postby Gowermick » 13 Aug 2018 09:55

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

Using FH 6.2.7, with CC 6.7.37 Windows 10.0.14393 Build14393, LibreOffice 6.0.5(x64), Firefox 61.0.1(64Bit) & Thunderbird 52.9.1
Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com


Return to “General Usage”

Who is online

Users browsing this forum: No registered users and 21 guests