* Help with Diagram Box Text
- PyreneesPirate
- Famous
- Posts: 144
- Joined: 06 Feb 2009 20:30
- Family Historian: V7
- Location: Montamat, SW France
Re: Help with Diagram Box Text
Hello again Mike
These are my current Box Diagram Expressions relating to Marriage and Relationships. I do have Marriage Icons with numbers i.e. Mr1-Mr4, I did actually put them in and it just replaced the two Mr icons showing against Louisa with Mr2 and Mr4, a bit like the relationship Icons R2 and R4.
Expression ranging from 6th to 17th position
=ContainsText(%INDI.FAMS>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc
=ContainsText(%INDI.FAMS[2]>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc
=ContainsText(%INDI.FAMS[3]>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc =ContainsText(%INDI.FAMS[4]>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc
=IsTrue(Exists(%INDI.FAMS>MARR.DATE%) and Not(ContainsText(%INDI.FAMS>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
=IsTrue(Exists(%INDI.FAMS[2]>MARR.DATE%) and Not(ContainsText(%INDI.FAMS[2]>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
=IsTrue(Exists(%INDI.FAMS[3]>MARR.DATE%) and Not(ContainsText(%INDI.FAMS[3]>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
=IsTrue(Exists(%INDI.FAMS[4]>MARR.DATE%) and Not(ContainsText(%INDI.FAMS[4]>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
%INDI.FAMS>MARR% Icon R1
%INDI.FAMS[2]>MARR% Icon R2
%INDI.FAMS[3]>MARR% Icon R3
%INDI.FAMS[4]>MARR% Icon R4
Having removed:
%INDI.FAMS>MARR%
%INDI.FAMS[2]>MARR%
%INDI.FAMS[3]>MARR%
%INDI.FAMS[4]>MARR%
and entered your options of:
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS%) for icon R1
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS[2]%) for icon R2
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS[3]%) for icon R3
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS[4]%) for icon R4
I am very happy that Rn now is showing and also happy to see two Mr icons.
Thanks for your time Mike, really appreciated.
Cheers,
PP
These are my current Box Diagram Expressions relating to Marriage and Relationships. I do have Marriage Icons with numbers i.e. Mr1-Mr4, I did actually put them in and it just replaced the two Mr icons showing against Louisa with Mr2 and Mr4, a bit like the relationship Icons R2 and R4.
Expression ranging from 6th to 17th position
=ContainsText(%INDI.FAMS>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc
=ContainsText(%INDI.FAMS[2]>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc
=ContainsText(%INDI.FAMS[3]>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc =ContainsText(%INDI.FAMS[4]>MARR.SOUR>%,"Certificate Marriage",STD) Icon Mc
=IsTrue(Exists(%INDI.FAMS>MARR.DATE%) and Not(ContainsText(%INDI.FAMS>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
=IsTrue(Exists(%INDI.FAMS[2]>MARR.DATE%) and Not(ContainsText(%INDI.FAMS[2]>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
=IsTrue(Exists(%INDI.FAMS[3]>MARR.DATE%) and Not(ContainsText(%INDI.FAMS[3]>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
=IsTrue(Exists(%INDI.FAMS[4]>MARR.DATE%) and Not(ContainsText(%INDI.FAMS[4]>MARR.SOUR>%,"Certificate Marriage",STD))) Icon Mr
%INDI.FAMS>MARR% Icon R1
%INDI.FAMS[2]>MARR% Icon R2
%INDI.FAMS[3]>MARR% Icon R3
%INDI.FAMS[4]>MARR% Icon R4
Having removed:
%INDI.FAMS>MARR%
%INDI.FAMS[2]>MARR%
%INDI.FAMS[3]>MARR%
%INDI.FAMS[4]>MARR%
and entered your options of:
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS%) for icon R1
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS[2]%) for icon R2
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS[3]%) for icon R3
=IsSameItem(%INDI.FAMS[last]%,%INDI.FAMS[4]%) for icon R4
I am very happy that Rn now is showing and also happy to see two Mr icons.
Thanks for your time Mike, really appreciated.
Cheers,
PP
Re: Help with Diagram Box Text
Really useful thread with some great ideas and solutions.
Following on from this, one thing that I'd really like to be able to do is use 'Partner' text in diagrams instead of Spouse for "Unmarried Couple" and "Never Married"
I changed "Spouse" to to "Spouse/Partner", but of course that changes it for everyone, which isn't quite what I want.
I'm guessing that for Spouse to display, the expression needs to check on the marriage date and for Partner the expression has to test for "Never Married" or "Unmarried Couple", but I'm afraid that creating the expression is beyond me!
Any help greatly appreciated
Following on from this, one thing that I'd really like to be able to do is use 'Partner' text in diagrams instead of Spouse for "Unmarried Couple" and "Never Married"
I changed "Spouse" to to "Spouse/Partner", but of course that changes it for everyone, which isn't quite what I want.
I'm guessing that for Spouse to display, the expression needs to check on the marriage date and for Partner the expression has to test for "Never Married" or "Unmarried Couple", but I'm afraid that creating the expression is beyond me!
Any help greatly appreciated
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Help with Diagram Box Text
I've moved this thread to the Diagrams & Charts forum.
I presume you have set the Diagram Option Spouse display options: to One box per marriage.
In the Diagram > Options > Text tab, I advise you to use the Clone... button to create a custom copy of the Text Scheme and in the original Text Scheme to use Restore Defaults.
For the custom copy use Edit Text Scheme..., select Spouse Name if 'One Box Per Marriage' and click Edit.
Yes, the Template expression needs to test the Family record Status and choose between "Partner: " and "Spouse: ".
The expression to perform that test is a bit tricky:
TextIf((%CUR~FAMS>_STAT% = "Never Married") or (%CUR~FAMS>_STAT% = "Unmarried Couple"), "Partner: ", "Spouse: ")
However, that is not enough because it will output the TextIf label even if there is no spouse/partner name.
So we also have to use the =CombineText function like this:
=CombineText( TextIf function as above, %CUR~SPOU>NAME:FULL%, , )
That will only display the TextIf label prefix if the spouse/partner name exists.
So the complete expression is:
=CombineText( TextIf((%CUR~FAMS>_STAT% = "Never Married") or (%CUR~FAMS>_STAT% = "Unmarried Couple"), "Partner: ", "Spouse: "), %CUR~SPOU>NAME:FULL%, , )
I presume you have set the Diagram Option Spouse display options: to One box per marriage.
In the Diagram > Options > Text tab, I advise you to use the Clone... button to create a custom copy of the Text Scheme and in the original Text Scheme to use Restore Defaults.
For the custom copy use Edit Text Scheme..., select Spouse Name if 'One Box Per Marriage' and click Edit.
Yes, the Template expression needs to test the Family record Status and choose between "Partner: " and "Spouse: ".
The expression to perform that test is a bit tricky:
TextIf((%CUR~FAMS>_STAT% = "Never Married") or (%CUR~FAMS>_STAT% = "Unmarried Couple"), "Partner: ", "Spouse: ")
However, that is not enough because it will output the TextIf label even if there is no spouse/partner name.
So we also have to use the =CombineText function like this:
=CombineText( TextIf function as above, %CUR~SPOU>NAME:FULL%, , )
That will only display the TextIf label prefix if the spouse/partner name exists.
So the complete expression is:
=CombineText( TextIf((%CUR~FAMS>_STAT% = "Never Married") or (%CUR~FAMS>_STAT% = "Unmarried Couple"), "Partner: ", "Spouse: "), %CUR~SPOU>NAME:FULL%, , )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Help with Diagram Box Text
Thanks for this Mike; I'll be trying it out tomorrow
Re: Help with Diagram Box Text
Hi Mike, sorry, I haven't been able to get this to work 
Using the completed expression produces "Template is invalid".
So I thought I'd try just the TextIf statement to see if I could work it out for myself - that produced "The expression beginning at position 26 of the template is not a recognised function".
Position 26 is the =, which I confirmed by removing the space before the = when the error message changed to " ...position 25...".
It would appear that it definitely doesn't like the equals sign - any thoughts?
Using the completed expression produces "Template is invalid".
So I thought I'd try just the TextIf statement to see if I could work it out for myself - that produced "The expression beginning at position 26 of the template is not a recognised function".
Position 26 is the =, which I confirmed by removing the space before the = when the error message changed to " ...position 25...".
It would appear that it definitely doesn't like the equals sign - any thoughts?
- tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Help with Diagram Box Text
Did you copy & paste the expression from my reply directly into the FH Template?
It would help if you can copy & paste the Template expression directly from FH to the reply box here so I can analyse it.
It would help if you can copy & paste the Template expression directly from FH to the reply box here so I can analyse it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Help with Diagram Box Text
Aagh, I need to learn to read - it said "Template valid" !!!
Thanks it works when I apply it; what a muppet I am!
Thanks it works when I apply it; what a muppet I am!