* Removed ending period from Fact Note

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
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Removed ending period from Fact Note

Post by BakerJL75 » 11 Jan 2021 17:35

Due to an import I would like to remove the last period in a fact note for every fact note. Only the last one. I'm still trying to get the hang of query's and LUA strings. Is there a way to do this in mass? FH7.

Thanks,
Jackie
Thanks,
Jackie

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

Re: Removed ending period from Fact Note

Post by tatewise » 11 Jan 2021 18:11

Yes, it can be done using Lua Pattern Mode in the Search and Replace plugin.
It cannot be done with a Query because they only ever read data and cannot change data.

On the Major Options tab ensure the Search Scope is All Records & Events/Attributes.

On the Extra Filters tab ensure that only Note & Description fields is ticked and choose Fact.Notes (~Fact.NOTE) from list.

Back on the Major Options tab set Search box to %.$ which matches a dot . anchored to the end of the Note $
The % escape symbol is needed because dot . has a 'magic' meaning in Lua Patterns but here we want its literal meaning.

Ensure the Replace box is empty and Lua Pattern Mode is selected.

However, I am fascinated why you need to remove those dots from the end of all Fact Notes?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Re: Removed ending period from Fact Note

Post by BakerJL75 » 11 Jan 2021 19:22

Thank you! Again.

Now that you ask, I need to investigate more.

My imported data all contains a period at the end of every note sentence. I made custom fact definitions that include the note field at the end.
I was ending up with 2 periods at the end of my sentences if there was a note.

Now that I'm typing this, it may be how I constructed my custom fact definitions. However, they are done, so I'll probably use search and replaces as you suggested and strip off the periods. I think that would be easier than fiddling with all my definitions again.

Jackie
Thanks,
Jackie

User avatar
BakerJL75
Famous
Posts: 200
Joined: 14 Dec 2020 11:29
Family Historian: V7

Re: Removed ending period from Fact Note

Post by BakerJL75 » 12 Jan 2021 16:56

Worked great. As I expected. You write great instructions. Thanks!
Thanks,
Jackie

Post Reply