An alternative to adding a Record Window column per spouse is to list all spouses in one column separated by a few spaces using the following expression: =Text(%INDI.~SPOU[1]>NAME[1]% . " " . %INDI.~SPOU[2]>NAME[1]% . " " . %INDI.~SPOU[3]>NAME[1]% . " " . %INDI.~SPOU[4]>NAME[1]%) It can easily be extended for as many spouses as you think you may need. If you only want surnames then use: =Text(%INDI.~SPOU[1]>NAME[1]:SURNAME% . " " . %INDI.~SPOU[2]>NAME[1]:SURNAME% . " " . %INDI.~SPOU[3]>NAME[1]:SURNAME% . " " . %INDI.~SPOU[4]>NAME[1]:SURNAME%) I have used spaces to separate names because if there are none or only one or two spouses then only trailing spaces are displayed. If you want to have say a comma (,) separator then you will have to use nested =TextIf(Condition,Text,Text) functions as follows. =Text(%INDI.~SPOU[1]>NAME[1]:SURNAME% . TextIf(Exists(%INDI.~SPOU[2]>NAME[1]%)," , " . %INDI.~SPOU[2]>NAME[1]:SURNAME% . TextIf(Exists(%INDI.~SPOU[3]>NAME[1]%)," , " . %INDI.~SPOU[3]>NAME[1]:SURNAME%, ""), "")) Back to the Focus Window - exactly what names do you want Jane to have in her various stages of life on the four tabbed display options, and the focussed person box above. Just on the Spouses & Children tab the following possibilities exist. (1) As a Child of her parents before she is married? (2) Adjacent to her 1st husband? (3) Adjacent to her 2nd husband? (4) Adjacent to her 3rd husband? (5) As a Parent to any of her children? Regards, Mike Tate -----Original Message----- From: family-historian-users-bounces@rootsweb.com [mailto:family-historian-users-bounces@rootsweb.com] On Behalf Of Paddy Buckley Sent: 01 October 2011 11:27 To: family-historian-users@rootsweb.com Subject: Re: [FHU] Multiple spouses Thank you Adrian. You have no need to be sorry for being pedantic. We should all be more precise. I was actually looking at the Focus window, not the Records window. I tried out your suggestion of adding extra spouse columns but that seemed to be a cumbersome solution; more so when it needed a fourth spouse column to deal with the birth of a child 4 years after the death of Jane's first husband and 2 years before her second marriage. Paddy Buckley ----- Original Message ----- From: "Adrian Bruce" <abruce@madasafish.com> To: <family-historian-users@rootsweb.com> Sent: Friday, September 30, 2011 12:08 PM Subject: Re: [FHU] Multiple spouses > <<snipped>> > the Record Window continues to show her maiden name at all three > marriages. > How can I alter this to show her current surname at the two subsequent> marriages? > <<snipped>> > > First I have to take you literally and deal with the Record window - that's the Individuals tab when it says [Records] at the top. (Sorry for being pedantic but not everyone calls everything the same thing). The explanation for why FH does what it does is that there is only one Individual record on file for "Jane". She simply happens to have 3 marriages, which are stored on her Individual record as links to 3 family records. It's not a Names window, so there's only one line for "Jane" and the name shown there is the first one on file. In addition, since it shows one line for all of a person's data, there's no possible concept of "current" name. > > I thought there was an item on the Wish List at http://www.fhug.org.uk/cgi-bin/index.cgi but can't find it, so it may have never got beyond a mailing list discussion. But under that idea, as well as showing the line for the record, there would be extra lines in the Record Window for each alternative name, which would act as short-cuts to the "real" record. > > In the meantime, you might care to customise your Records window (right click column headings to customise) and add columns for the surname of the spouses - the pain here is that you'd need to add a separate column for the surname of Spouse(1), then Spouse(2), etc., however many you think you need. > > I don't know if you've recorded Alternate names for "Jane" - that would be another possibility but that also illustrates just how complex multiple names is - some people use Alternate-names (which cannot be dated in correct GEDCOM), and some just follow the family history default of allowing it to go by implication. I just checked one of my ancestors and FH carefully (and sensibly) avoids the issue by just referring to "Jane" in the narrative report after her birth event. > > Adrian B
On 01/10/2011 13:49, Beryl & Mike Tate wrote: > An alternative to adding a Record Window column per spouse is to list all spouses in one column separated by a few spaces using the > following expression: > =Text(%INDI.~SPOU[1]>NAME[1]% . " " . %INDI.~SPOU[2]>NAME[1]% . " " . %INDI.~SPOU[3]>NAME[1]% . " " . %INDI.~SPOU[4]>NAME[1]%) This example raises a question in my mind: does FH support user-defined functions? Suppose you or I could write a SpouseName() function, when that fairly scary expressions might become something like: =Text(SpouseName(%INDI%) . " " . SpouseName(%INDI%,2) . " " . SpouseName(%INDI%,3) . " " . SpouseName(%INDI%,4)) This seems both more readable and easier to extend. It would enable complex expressions to be put together from simpler building blocks, which would be sharable between queries. An improvement to the function's logic or capabilities would only have to be made in one place, to become automatically available wherever used. Once somebody has written and published a user-defined function, other users could easily download a copy from a FHUG repository. -- Cheers, Roger
The short answer is NO User-Defined Functions are not supported by FH. It also unlikely they would ever be supported, because it would involved publishing an interface to the internal workings of FH that only computer experts would understand. In the context of the example given though, what would be feasible would be User-Defined Macros. These look like Functions, but actually involve quite straight-forward text string substitution logic. So for instance a Macro such as 'SpouseName( )' would be defined as '%INDI.~SPOU[$1]>NAME[1]%' where $1 represents the 1st parameter. Thus: SpouseName( 1 ) would become %INDI.~SPOU[1]>NAME[1]% SpouseName( 2 ) would become %INDI.~SPOU[2]>NAME[1]% SpouseName( 3 ) would become %INDI.~SPOU[3]>NAME[1]% Taking this a step further, the space separators could be incorporated, by using '%INDI.~SPOU[$1]>NAME[1]% . " " ' And with a bit more sophistication and allowing custom separators 'CombineText( $2, %INDI.~SPOU[$1]>NAME[1]%, "")' Thus: SpouseName( 2, " & " ) would become CombineText( " & ", %INDI.~SPOU[2]>NAME[1]%, "") and the final Expression would be =Text( SpouseName(1,) . SpouseName(2," & ") . SpouseName(3," & ") . SpouseName(4," & ") ) Alternatively, going the whole hog, a Macro called AllSpouseNames(" & ") could be defined as =Text(CombineText("",%INDI.~SPOU[1]>NAME[1]%,"").CombineText($1,%INDI.~SPOU[2]>NAME[1]%,"").CombineText($1,%INDI.~SPOU[3]>NAME[1]%," ").CombineText($1,%INDI.~SPOU[4]>NAME[1]%,"")) I feel a FHUG Wish List entry blossoming! Regards, Mike Tate -----Original Message----- From: family-historian-users-bounces@rootsweb.com [mailto:family-historian-users-bounces@rootsweb.com] On Behalf Of Roger Firth Sent: 02 October 2011 11:12 To: family-historian-users@rootsweb.com Subject: Re: [FHU] User-defined Queries (was Multiple spouses) On 01/10/2011 13:49, Beryl & Mike Tate wrote: > An alternative to adding a Record Window column per spouse is to list all spouses in one column separated by a few spaces using the following expression: > =Text(%INDI.~SPOU[1]>NAME[1]% . " " . %INDI.~SPOU[2]>NAME[1]% . " " . %INDI.~SPOU[3]>NAME[1]% . " " . %INDI.~SPOU[4]>NAME[1]%) This example raises a question in my mind: does FH support user-defined functions? Suppose you or I could write a SpouseName() function, when that fairly scary expressions might become something like: =Text(SpouseName(%INDI%) . " " . SpouseName(%INDI%,2) . " " . SpouseName(%INDI%,3) . " " . SpouseName(%INDI%,4)) This seems both more readable and easier to extend. It would enable complex expressions to be put together from simpler building blocks, which would be sharable between queries. An improvement to the function's logic or capabilities would only have to be made in one place, to become automatically available wherever used. Once somebody has written and published a user-defined function, other users could easily download a copy from a FHUG repository. -- Cheers, Roger