Page 1 of 1
marital status in diagrams
Posted: 26 Jun 2020 18:18
by edinbeds@gmail.com
I want to show "Marital Status" in my text box in my diagrams (if non-blank) but cannot find how to reference. I know it should be simple but I cannot see how.
Thanks
Ed Fisher
Re: marital status in diagrams
Posted: 26 Jun 2020 18:52
by LornaCraig
In the Edit Text scheme dialog, select <Custom Item> from the list on the left and click > . Then enter %CUR~FAMS>_STAT% in the Template field.
It gets a bit more complicated if someone had more than one partner because your text scheme needs to make it clear which relationship the status applies to. Does that situation arise?
Re: marital status in diagrams
Posted: 26 Jun 2020 18:54
by tatewise
Welcome to the
FHUG Ed.
In case you have not found the necessary options here are the steps:-
With the
Diagram displayed use
Diagram > Options or right-click
Diagram Options.
Open the
Text tab and select the
Text Scheme you wish to modify.
It is advisable to use the
Clone... button to make a custom copy, leaving the standard
Text Scheme untouched.
Click the
Edit... button to open the
Edit Text Scheme dialogue.
Select
<Custom Item...> from
Available Items on the left and click
> button in middle to add to scheme.
In the
Description box enter
Marriage Status as its title.
In the
Template box insert
Marriage Status: or whatever label you want to appear in
Diagram.
To the right of the
Template box click the
< < Insert data ref assistant button to find the
Status ref.
Expand
[+] Current Family as Spouse, then
[+] Miscellaneous, select
Status and click
Insert button.
So the data ref inserted will be
%CUR~FAMS>_STAT% as shown below.
That will automatically apply to the appropriate family couple even if there were
multiple partners.
Click the
Test button lower right to check the
Template is valid and then click
OK.
Back in the
Edit Text Scheme dialogue use the up/down arrows if necessary to move this new item into position.
Click
OK and
OK again to see the results of your handiwork.

- MarriageStatus.png (93.13 KiB) Viewed 6077 times
Re: marital status in diagrams
Posted: 26 Jun 2020 19:48
by LornaCraig
That will automatically apply to the appropriate family couple even if there were multiple partners.
Sorry to disagree but I don't think it is clear. Perhaps it depends on where you display things in the rest of the text scheme. For example if I add the marital status to my standard text scheme, if a man has one wife and one partner and the status for the relationship with the partner is 'Never Married', the words 'Never Married' appear in the man's box as well as the partner's box. So it is not obvious from the man's box which person he was never married to. It is particularly ambiguous if there are no marriage details for the wife.
Re: marital status in diagrams
Posted: 26 Jun 2020 20:05
by tatewise
It is likely to be clear enough in most cases but the full solution does require the adoption of the standard
Marriage item settings for
Box Types and Conditions as shown below, but even that only works if spouses are shown in own boxes.
If shown in a single box then partner details need to be added to the
Template for
Status.

- MarriageStatusPartners.png (25.95 KiB) Viewed 6067 times
Re: marital status in diagrams
Posted: 26 Jun 2020 20:42
by LornaCraig
Yes, this is the setting that makes the difference:

- Display options.JPG (54.98 KiB) Viewed 6056 times
Re: marital status in diagrams
Posted: 26 Jun 2020 21:08
by tatewise
Those other settings are the default for a Marriage item, so why not use them for Status?
That ringed option is good when partners have own box, but what about other scenarios?
Re: marital status in diagrams
Posted: 27 Jun 2020 00:10
by LornaCraig
I didn't choose those settings. They appear by default when I add any <Custom Item> .
However we should not get bogged down with this unless the OP has any problems with individuals with multiple partners. Don't want to over complicate things.
Re: marital status in diagrams
Posted: 27 Jun 2020 17:46
by edinbeds@gmail.com
Thanks Mike Tait. I never would have found it myself. It allows me to highlight parents of illegitimate children when I know they were never married (e. birth certificate says illegitimate).
It worked first time.
Ed Fisher
Re: marital status in diagrams
Posted: 30 Mar 2021 04:31
by Hanning
Further to this discussion - I would like to write an expression that shows m.[marriage year] if it is entered, or m., if there is a spouse but no date, or "Never Married" if that status is recorded, but no status otherwise. So far, working towards getting two of three conditions to work, I have tried
ItemIf(%CUR~FAMS>_STAT%="Never Married", %CUR~FAMS>_STAT%, m. %CUR~FAMS>MARR.DATE:YEAR%) which comes up with an error at the "Never Married" stage
Have also tried using TextIf(Exists(%CUR~FAMS>MARR.DATE:YEAR%),CombineText("m.", %CUR~FAMS>MARR.DATE:YEAR%) which tests correctly but shows as written on the diagram - that is, with the words TextIf(Exists)m. 1874 etc
Is my attempt to put it all on one line a step too far?
Re: marital status in diagrams
Posted: 30 Mar 2021 11:17
by tatewise
You were getting close. Here are some tips to watch out for.
=ItemIf(...) needs both its 2nd & 3rd parameters to be data ref items and your 3rd param is not.
=TextIf(...) needs both its 2nd & 3rd parameters to be a single text item or a data ref that displays text.
The number of opening and closing ( parentheses ) must match in pairs.
Build the expressions section by section.
So instead of =ItemIf use =TextIf and start with:
=TextIf( %CUR~FAMS>_STAT% = "Never Married", "Never Married", "?" )
That will display Never Married or ?
Now consider what needs to replace the "?"
TextIf( Exists(%CUR~FAMS>MARR%), Text("m. " . %CUR~FAMS>MARR.DATE:YEAR%), "")
That will only display anything if a Marriage event exists and then shows m. optionally followed by the YEAR (if any).
The whole expression is:
=TextIf( %CUR~FAMS>_STAT% = "Never Married", "Never Married", TextIf( Exists(%CUR~FAMS>MARR%), Text("m. " . %CUR~FAMS>MARR.DATE:YEAR%), "" ) )
Re: marital status in diagrams
Posted: 30 Mar 2021 19:30
by Hanning
Thank you Mike - for the correct formula as well as the explanation. Helps enormously in getting the diagrams to appear as I wish.
Re: marital status in diagrams
Posted: 30 Mar 2021 19:44
by Hanning
Amending further - I added in the marriage place to the working formula as follows: =TextIf( %CUR~FAMS>_STAT% = "Never Married", "Never Married", TextIf( Exists(%CUR~FAMS>MARR%), Text("m. " . %CUR~FAMS>MARR.DATE:YEAR%, %CUR~FAMS>MARR.PLAC:SHORT% ), "" ) ) returns "The expression at position 1 of the template is not a recognised function". I didn't alter anything at Position 1 so how do I deal with this error? It happens quite frequently when I am enhancing as existing formula.
Amended. - I found my error - didn't have the . before place name. But not at position 1? Have also tried to insert a space before place name =TextIf(%CUR~FAMS>_STAT% = "Never Married","Never Married",TextIf(Exists(%CUR~FAMS>MARR%),Text("m. " . %CUR~FAMS>MARR.DATE:YEAR% . " " . %CUR~FAMS>MARR.PLAC:SHORT%),"")) but this returns the place name twice.
Re: marital status in diagrams
Posted: 30 Mar 2021 20:56
by tatewise
Yes, sometimes the error message is not very helpful. It is one of the weak points of FH.
You correctly spotted the dot operators needed to join text components together.
There is nothing wrong with your final expression. It works perfectly for me.
Do you have a rogue extra %CUR~FAMS>MARR.PLAC:SHORT% beyond the far righthand end of the Template box that you may not notice unless you hit the End keyboard button or copy the entire expression into a plain text editor like Windows Notepad.
Re: marital status in diagrams
Posted: 31 Mar 2021 04:31
by Hanning
Sorted - user error! I had another field below that I hadn't deleted. Thanks again for your advice Mike.