* Help with an expression

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
User avatar
Ossey55
Platinum
Posts: 42
Joined: 28 Apr 2022 22:30
Family Historian: V7
Location: Bolton, Mississippi, USA

Help with an expression

Post by Ossey55 » 09 Sep 2022 20:59

I am using the following expression now with my grave location project:
=ContainsText(%INDI.BURI.NOTE2%,"Section",STD)
I have found that cemeteries do not follow a standard for locations of graves. Some use Sections, Lots, Plots, and grave numbers.
My question is: How do I add more words to the above expression without getting more icons for my chart?
I want only one icon to show up after searching for the words Section, Lot, Plot, Grave in my notes field.
Thanks for any help
Jim

User avatar
Ron Melby
Megastar
Posts: 878
Joined: 15 Nov 2016 15:40
Family Historian: V6.2

Re: Help with an expression

Post by Ron Melby » 09 Sep 2022 22:31

perhaps you create your own standard thing in the note.

Loc: grave U_14
Loc: lot 1554 section heaven
Loc: section eternity, space 15

or something
GLI: (grave location information for me) that is unlikely to show up in any other kind of note in that combination, and preface all locations with a standard aha!!!!!! gotcha fer shur!!!!!! text tag.
FH V.6.2.7 Win 10 64 bit

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

Re: Help with an expression

Post by tatewise » 10 Sep 2022 08:47

This is related to your earlier posting Help with an expression (20871) that was also looking for a burial location.

I think Ron's suggestion may be the best solution. Otherwise, you might keep having to cope with new words.

A similar suggestion is given in FHUG Knowledge Base Narrative Report Fact Sentence Templates under Custom Fact Fields where it explains how to add labelled meta-fields in the Note field.
Then use =ContainsText(%INDI.BURI.NOTE2%,"Location:",STD) or =GetLabelledText(%INDI.BURI.NOTE2%,"Location:") to detect any burial location whether it is GPS, Section, Plot, Lot, Grave number, or anything else that may arise.

A potential snag with using =ContainsText(...) to detect short text like Plot and Lot is that they are not case sensitive nor bounded words. So for those two cases Plot would match plotting and Lot would match plotting, clothes, slots, etc.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Ossey55
Platinum
Posts: 42
Joined: 28 Apr 2022 22:30
Family Historian: V7
Location: Bolton, Mississippi, USA

Re: Help with an expression

Post by Ossey55 » 10 Sep 2022 13:45

Thank you, Ron and Mike.
I am going to use the Loc: suggestion, even though it will take a while to change them all. I have over 700 to do.
Jim

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

Re: Help with an expression

Post by tatewise » 10 Sep 2022 15:07

It might be possible to use the Search and Replace plugin to perform the task.
Perhaps have a trial run on a COPY of your Project.
The settings shown below will insert the word Location: before the first line in the Burial Note only if text exists.
On the Extra Filters tab ensure only Note & Description fields is ticked and Fact Notes (~Fact.NOTE) chosen.

BurialNoteSearchAndReplace.png
BurialNoteSearchAndReplace.png (50.44 KiB) Viewed 472 times

The Search: (.+) captures the Burial Note text but only if any exists.
The Replace: Location: %1 inserts Location: and the captured text.

The Result Set lists the changes that can be quickly scanned to check the changes are OK.
If not, then selectively edit the ones that need fixing, or use Edit > Undo Plugin Changes to undo them all.

Ask if you need further advice.
For example, if it is necessary to specifically look for GPS, or Section, or Plot, etc...
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply