* Limit lines shown for notes in diagram box

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
PeterWieland
Platinum
Posts: 36
Joined: 27 May 2004 23:07
Family Historian: V6.2
Location: Scunthorpe

Limit lines shown for notes in diagram box

Post by PeterWieland » 27 Apr 2023 08:55

I've searched and not found anything relevant.

In my diagrams I display the individual's notes field (Notes, Individual). The template is Notes %INDI.NOTE2[1+]%

This is fine for most individuals with only a short note. However I have a few with rather long explanations as to how I reached decisions where the evidence is not conclusive, and the box on the diagram ends up way too big.

I don't need to read the full description on the diagram, I just want to know at a glance that there are notes for this individual.

Is there a way of limiting the number of lines displayed? Could I do something with the template?

Alternatively is there a way of displaying something like 'Note Present' instead of the full text?

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Limit lines shown for notes in diagram box

Post by Jane » 27 Apr 2023 09:08

You could use any of the following:

Show first 20 characters of first note:

Code: Select all

=LeftText(%INDI.NOTE2%,20,"")...
Show "Has Note" if note exists:

Code: Select all

=ExistsText(%INDI.NOTE2%,"Has Note")
Another option would be to add a box condition to show an icon, just using

Code: Select all

%INDI.NOTE2%
As the condition and add an icon of your choice.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

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

Re: Limit lines shown for notes in diagram box

Post by tatewise » 27 Apr 2023 09:30

A better option for Jane's first suggestion is:

=LeftText( %INDI.NOTE2%, 50, "ELLIPSIS" )

That will display at most the first 50 characters (or however many you choose), but if there are more characters then the text is terminated in an ellipsis (...) to indicate it has been truncated.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
PeterWieland
Platinum
Posts: 36
Joined: 27 May 2004 23:07
Family Historian: V6.2
Location: Scunthorpe

Re: Limit lines shown for notes in diagram box

Post by PeterWieland » 27 Apr 2023 13:23

Thanks for the replies. I like the idea of the truncated field, with tatewise's ellipsis modification.

However, I can't work out where to put it. If I put it in the Template box of 'Edit Text Scheme Item' I get 'The expression beginning at position 1 of the template is not a recognised Function'

If I add it as a condition on the Boxes tab, I get 'Expression is not valid'.

I am an experienced coder (Visual Basic, C++, etc., so understand functions and conditions, but FH is a bit different to other coding I do and it isn't always straightforward where to put the code!

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

Re: Limit lines shown for notes in diagram box

Post by tatewise » 27 Apr 2023 16:17

Peter, a screenshot of exactly what you are entering will save a lot of back and forward discussions.
Yes, it has to go in the Edit Text Scheme Item for the Note Template in the same place you had Notes %INDI.NOTE2[1+]%.
i.e. Notes =LeftText( %INDI.NOTE2%, 50, "ELLIPSIS" )

Did you copy and paste from here into the Template?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
PeterWieland
Platinum
Posts: 36
Joined: 27 May 2004 23:07
Family Historian: V6.2
Location: Scunthorpe

Re: Limit lines shown for notes in diagram box

Post by PeterWieland » 01 May 2023 10:06

Thanks for the reply Mike,
Yes, I did copy and paste, and I get an error. I have tried it with and without the space between 'Notes' and '='.

It doesn't like the '='. As a coder that seems odd as it looks like a reasonable format for a statement!
TemplateError.jpg
TemplateError.jpg (88.23 KiB) Viewed 594 times

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

Re: Limit lines shown for notes in diagram box

Post by tatewise » 01 May 2023 10:40

Sorry Peter, I've just noticed that you are using FH V6.2 which does not support the =LeftText(...) function.

So to use that option you must upgrade to FH V7.0.

The other options suggested by Jane should work in FH V6.2.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
PeterWieland
Platinum
Posts: 36
Joined: 27 May 2004 23:07
Family Historian: V6.2
Location: Scunthorpe

Re: Limit lines shown for notes in diagram box

Post by PeterWieland » 01 May 2023 11:24

Thanks Mike,

The only option that works is to use a condition and icon. Not ideal, as I already have icons for each census entry that I have found. If I've got the full set from 1841 to 1921 for an individual (and I do have a few born before 1841 who lived into their 80s), that's a lot of icons under the box!

I hadn't upgraded from v6 because there weren't any new features in v7 that would be of much use to me. However I may need to consider the upgrade now!

Post Reply