* Chart TextBox Data Reference problem introducing a <space>

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
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Chart TextBox Data Reference problem introducing a <space>

Post by rob_it » 21 Apr 2017 22:33

I have the following in a Chart Text Box

%INDI.~CHIL[3]>% =CombineText("Born: ", %INDI.~CHIL[3]>BIRT.DATE:COMPACT% , %INDI.~CHIL[3]>BIRT.PLAC>% ,"" ) =CombineText("Died: ", %INDI.~CHIL[3]>DEAT.DATE:COMPACT%,,"" )

but need to somehow introduce a <space> in the output between the birth date and the birth place. Viz Result currently gives ...... 1 Apr 1844Stepney,London....... and I need ..... 1844 Stepney,London .....

(where ........ indicates results from rest of Data Refs output that appears to work ok)

I've tried: %INDI.~CHIL[3]>BIRT.DATE:COMPACT% ,X %INDI.~CHIL[3]>BIRT.PLAC>%
where X=" "
or ' '
or & " "
or + " "
to no avail - is it syntax or just not possible to combine a space with a date reference in this way. Can anyone please help?

Rob

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

Re: Chart TextBox Data Reference problem introducing a <space>

Post by tatewise » 21 Apr 2017 23:27

Perhaps you didn't realise you can nest functions within other functions parameters, but then the leading = sign is omitted.

This scenario can use the =Text(...) function to join multiple textual components into one.
e.g.
=CombineText("Born: ", %INDI.~CHIL[3]>BIRT.DATE:COMPACT%, Text(" " . %INDI.~CHIL[3]>BIRT.PLAC>% ), "" )

Or in this case since the space is a single prefix you can use your familiar =CombineText(...) function, which is better because the space is only inserted if a Place name exists.
e.g.
=CombineText("Born: ", %INDI.~CHIL[3]>BIRT.DATE:COMPACT%, CombineText(" ",%INDI.~CHIL[3]>BIRT.PLAC>%,"",""), "")

However, with those expressions, if there is no Date but there is a Place it is not shown.
So a better expression has the space suffix on the Date plus the Place all in 2nd parameter :-
=CombineText("Born: ", Text( CombineText("",%INDI.~CHIL[3]>BIRT.DATE:COMPACT%," ","") . %INDI.~CHIL[3]>BIRT.PLAC>%), "", "" )

And if you want in before the Place name use :-
=CombineText("Born: ", Text( CombineText("",%INDI.~CHIL[3]>BIRT.DATE:COMPACT%," ","") . CombineText("in ",%INDI.~CHIL[3]>BIRT.PLAC>%,"","") ),"","")
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

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

Re: Chart TextBox Data Reference problem introducing a <space>

Post by tatewise » 22 Apr 2017 08:59

Having mulled this problem over there is a much better solution, and a number of considerations.

1) Children Looping Index

I suspect you want to list all the children and have an Item for each child instance from [1] to say [9].
That can be achieved with just one Item using the [1+] looping index on every Data Reference.
e.g. %INDI.~CHIL[1+]>% Born: %INDI.~CHIL[1+]>BIRT.DATE%

2) All or Current Family Children

Your example will list all children for all Family partnerships whether those couples appear in Diagram or not.
To only list children of currently displayed couple use CUR~FAMS>CHIL context ref in place of INDI.~CHIL shortcut.
e.g. %CUR~FAMS>CHIL[1+]>% Born: %CUR~FAMS>CHIL[1+]>BIRT.DATE%

3) Group With Previous Line

Rather than a single Template with complex Functions use Group with previous line with three simple Templates that benefit from the built in Template Constant Text Rules that will automatically handle the text such as Born: and in dependent on whether a Date &/or a Place exists, similar to the standard Birth and Death Items.
e.g. Three Item Group :-
Child Name %CUR~FAMS>CHIL[1+]>%
Child Birth Born: %CUR~FAMS>CHIL[1+]>BIRT.DATE:COMPACT% in %CUR~FAMS>CHIL[1+]>BIRT.PLAC:TIDY%
Child Death Died: %CUR~FAMS>CHIL[1+]>DEAT.DATE:COMPACT% in %CUR~FAMS>CHIL[1+]>DEAT.PLAC:TIDY%
where the Child Birth & Death Items tick Group with previous line but not Start on New Line.

4) Date & Place Qualifiers

Throughout all the Items of the Text Scheme the Date and Place qualifiers should be consistent.
Otherwise, the Edit Text Scheme settings for Date Format and Place Format will say <multiple>.
If they are all consistent, then altering those settings will automatically Edit every Item to match.
The usual defaults are Compact and Tidy respectively, so apply :COMPACT and :TIDY as shown above.

5) Conditional Child Text

I suspect you only want to show all the Child details when say there are no further generations in the Diagram.
Thus the Child Name Item introduced above would have some conditional expression that affects the whole Group.
e.g. =NotExistsText( %CUR~FAMS>CHIL>~CHIL>%, %CUR~FAMS>CHIL[1+]>% )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Chart TextBox Data Reference problem introducing a <space>

Post by rob_it » 22 Apr 2017 17:05

Hi Mike,

Thanksvery much for your initial response - that worked fine in my chart of a family tree. I was having the same problem as William regarding it becoming too wide( as I have several branches that end with up to 10 children) and tried adapting your solution to 'Customising diagram end of branch siblings'.

I'm now trying to find my way through your second solution (which looks very elegant) but with little luck. Is it still relevent in my specific case where I have a whole family tree shown above these 'sibling block' textboxes - as I don't want to interfere with the other boxes within the tree by messing with my diagram template? I've tried putting the code from Item 1) Child Looping Index in the Textbox but it doesn't loop through, it just shows the first child (with details) and Item 2) just shows 'Born:' once. Do I need to put something in the Data Tab>Relation Expression of the Text box to get the Looping index to work? - as you can see I'm beginning to clutch at straws here.

Rob

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

Re: Chart TextBox Data Reference problem introducing a <space>

Post by tatewise » 22 Apr 2017 19:08

For the looping index to work you MUST use it consistently in every data reference in the Item.
Post your Template expression and I can advise.

How are you restricting the list of children to just a subset of the boxes?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
rob_it
Gold
Posts: 28
Joined: 13 Aug 2015 13:10
Family Historian: V6.2

Re: Chart TextBox Data Reference problem introducing a <space>

Post by rob_it » 24 Apr 2017 19:52

Hi Mike.

To recap on my actions:
To arrive at my original question I followed your instructions in 'Customising diagram end of branch siblings' adding my modified list in a new Text Box I created , Inserting a Base person (the father of the children) into the Data tab, clicking the children's expansion button to hide the child boxes above and put the new box containing the children in their place. I only want to do this for some end of branches in the tree.

For your 2nd posted solution I've copied and pasted your 1) Data Reference into the text box to replace all the previous Data References but it did not loop through all his children - only giving the required details for the first child. Item 2) only gives' birth:' ( I've also tried this in the Monro Sample Project by creating a Text box in a similar way - with the same result).
--------
When you say 'For the looping index to work you MUST use it consistently in every data reference in the Item." are you talking about something other than the Data Reference/s you have given me for the Text box?

Re: 'Post your Template expression and I can advise'. If attachments below are not what you wanted please point me in the right direction or spoon feed me to where I can get a copy of the template you need.
Text Scheme from the Diagram Options>Text Tab
Birth:
Birth.JPG
Birth.JPG (145.61 KiB) Viewed 4663 times
Death:
Birth.JPG
Birth.JPG (145.61 KiB) Viewed 4663 times
Thanks
Rob
Attachments
Death.JPG
Death.JPG (134.61 KiB) Viewed 4663 times

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

Re: Chart TextBox Data Reference problem introducing a <space>

Post by tatewise » 24 Apr 2017 21:05

Sorry, I missed the significance of your original reference to a Chart Text Box and thought you were talking about an Edit Text Scheme Item as part of a Diagram Text Scheme.

Now I understand you were using a Text Box as discussed in Customising diagram end of branch siblings (13391).
For them you will have to use the complex CombineText(...) expressions I posted originally.
The looping index and other refinements do not work in a Text Box.

Your Edit Text Scheme expressions don't loop as they apply to the Individual's single Birth event, instead of all the Children's.

You could experiment with a way of using the Edit Text Scheme approach instead of the separate Text Boxes.
Use my Group With Previous Line technique with the three Items described.

Once that is essentially working for every Box in the Diagram you need to make it conditional on the end branches.
See my Conditional Child Text suggestion, but that example condition may not be satisfactory for you.
Alternatively, use the Flag Condition tick box and set the chosen Flag on each Individual whose children need listing.
The Box size of these particular Individuals will need stretching to show all the Child details.

If that advice is too cryptic then I can go into more step by step instructions with screenshots.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply