* split notes delimiter options

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
avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

split notes delimiter options

Post by JoopvB » 15 May 2015 08:10

I use the note field to enrich my narratives (ex TMG :) ) and I use it split in parts in the sentences by means of the TextPart function (like {=TextPart(%FACT.NOTE2%,1)} etc.). This works fine but I think 2 small improvements might make it even more wonderful:

1. Make the delimiter any character chosen by the user (or if it needs be a fixed one, not something we use in sentences, like the comma it is now). TMG uses "|" as a fixed delimiter; that could work.
2. I expect this feature (when people start using it) to become really popular. So, why not make it easy for the user and parameterize the {role} code with the TextPart parameters. Something like {role[1]} and {role[2,3]} would be nice.

As a small extra: it is (in general) I think a good idea to be able to enter some lines of documentation/explanation of what to enter at a fact. This can then show up when entering the fact as a reminder on how or what.

Examples of usage:
- in Birth: [1] time of birth, [2] end of sentence text
- in Death: [1] time of death, [2] end of sentence text
- in Marriage: [1] religion, [2] relation of witnesses to groom and bride, [3] end of sentence text
- in Baptism (or Christening): [1] religion, [2] relation of witnesses to child, [3] end of sentence text

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

Re: split notes delimiter options

Post by tatewise » 15 May 2015 10:16

I fully support the idea of =TextPart() allowing the delimiter to be defined.
It has to allow comma, because that is the delimiter in Place and Address fields, for which it was specifically introduced, but allowing other delimiters for other fields would be useful.

On the other hand, for the purpose described, why not use =GetParagraph() that extracts newline delimited text from Note fields, etc?

Is you last suggestion talking about seeding the Fact Note with advisory text, when the Fact is added? If so, then you can already do that.
See Tools > Fact Types > Edit > Advanced > Auto-Create Note.

If all the above provide acceptable solutions then I am tempted to move this to General Usage.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: split notes delimiter options

Post by JoopvB » 15 May 2015 14:20

Hi Mike,

The =GetParagrah() does exactly what I like to see happen. Thanks, I missed that one on my search for knowledge :). One question though, in the help file it says:

=GetParagraph(%INDI.BIRT.NOTE2%,2)

This example will return the 2nd paragraph of the note associated with a given person’s birth event.


I now use (in the Birth fact) =GetParagraph(%FACT.NOTE2%,2) and that works; the example doesn't. Why?

About the "documentation" of the parts in the notes. As I understand the auto-text, it creates a text. So I have to remove it every time? What I was looking for was something like grayed out text in the note field explaining what to enter (or something like that).

I agree to move this to the General Usage; my major whish is nicely supported by the GetParagrah.

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

Re: split notes delimiter options

Post by tatewise » 15 May 2015 15:39

Like most functions =GetParagraph() can be used in many different contexts.
So its Data Reference parameter depends on where it is used.
In Sentence Templates the context is the current %FACT%.

As we explored in Non-English sentences (12564), to switch context to the %INDI% record, we used FieldText( GetRecord(), 'INDI.SEX' ) where GetRecord() defaults to GetRecord(%FACT%) and gets its containing record, which is the Individual %INDI% record so FieldText() then works in that %INDI% context.

Queries come in 10 different flavours; one for each record type, plus Facts.
Functions used there will default to the associated record type context.
So in a Family Query the functions will default to %FAM% context, and so on...

So to get =GetParagraph( %INDI.BIRT.NOTE2%, 2 ) to work in a Sentence Template would look something like:
=GetParagraph( Field( GetRecord(), 'INDI.BIRT.NOTE2' ), 2 )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: split notes delimiter options

Post by JoopvB » 15 May 2015 17:19

I get it now Mike. Thanks again for the clear explanation.

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: split notes delimiter options

Post by jimlad68 » 16 May 2015 17:02

JoopvB
re
What I was looking for was something like grayed out text in the note field explaining what to enter
I think perhaps you are referring to the TMG data input that gives the option for a Reminder (eg your own help info) via the Edit Tag (which has an option to show or not show the Reminder window automatically). Yes that would be nice, in the meantime I suspect Mike's suggestion works but with the other advantage of offering a template.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Re: split notes delimiter options

Post by JoopvB » 16 May 2015 17:31

Yes, that's the idea. With all the extensive customization options in FH some kind of "my own help" feature would certainly be fitting.

Post Reply