* <para> in sentence structure

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
TMG_refugee
Famous
Posts: 111
Joined: 14 Nov 2015 15:44
Family Historian: V7

<para> in sentence structure

Post by TMG_refugee »

I'm pretty sure this has been discussed previously but I cannot seem to find the answer.

I want to in a sentence structure test to see if there is a note and then either put out a <br> or a <para> but the <br> or <para> does not seem to be resolved and is just text.

This is what I have tried and does not seem to work:
{=TextIf(Exists(%INDI.BIRT[1].NOTE2[1]%),'<para>','<br>')}
User avatar
ADC65
Superstar
Posts: 472
Joined: 09 Jul 2007 10:27
Family Historian: V7

Re: <para> in sentence structure

Post by ADC65 »

It might be because of the angle brackets, which FH will see as part of an expression syntax. I'm not absolutely sure of the solution; have a look at the help here: https://www.family-historian.co.uk/help ... rmats.html
Adrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
User avatar
tatewise
Megastar
Posts: 28438
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: <para> in sentence structure

Post by tatewise »

=TextIf(...) and similar functions only accept text for the 2nd & 3rd parameters.
'<para>' and '<br>' are plain text strings, so are nothing to do with the formatting codes <para> and <br>.

I think you want to insert an unconditional <br> newline and then a conditional <br> newline if there is a Note so the two newlines are equivalent to a paragraph break.
So use <br><<br>{note}>

BTW: Another technique is to always start such Note fields with a blank newline then the {note} code will always include that newline in the displayed sentence.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
TMG_refugee
Famous
Posts: 111
Joined: 14 Nov 2015 15:44
Family Historian: V7

Re: <para> in sentence structure

Post by TMG_refugee »

Mike,

That is a great suggestion. I needed to modify slightly <<br>{note}><para> to get the spacing I wanted. This does not allow for this spacing if I don't want the note printed out.

Just for my edification is there a way to do a conditional statement like I had originally tried?
User avatar
tatewise
Megastar
Posts: 28438
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: <para> in sentence structure

Post by tatewise »

TMG_refugee wrote: 13 Apr 2024 13:03 Just for my edification is there a way to do a conditional statement like I had originally tried?
No, not to govern the <br> and <para> codes because (as I said) the =TextIf(...) function requires text parameters and the formatting codes <br> and <para> are NOT text.

Your {=TextIf(...)} conditional statement was valid but only for text parameters "<para>" and "<br>" that are not formatting codes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
TMG_refugee
Famous
Posts: 111
Joined: 14 Nov 2015 15:44
Family Historian: V7

Re: <para> in sentence structure

Post by TMG_refugee »

Thanks Mike
Post Reply