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
* Help with an expression
Re: Help with an expression
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.
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
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Help with an expression
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.
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
- Ossey55
- Platinum
- Posts: 42
- Joined: 28 Apr 2022 22:30
- Family Historian: V7
- Location: Bolton, Mississippi, USA
Re: Help with an expression
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
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
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Help with an expression
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.
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...
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.
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