RootsWeb.com Mailing Lists
Total: 2/2
    1. Re: [FHU] Ancestors' Report Query
    2. Bernard Sharp
    3. Hi Mike, Many thanks for your detailed solution to my question. I copied your expression into my ‘custom query’ (yes, you read my mind about terminology correctly) and got the desired result. This has, however, triggered two further questions: Firstly, the expression I had originally utilised to determine whether my database held a multimedia item for each event date will now require modification to accommodate multiple marriages. This is the expression I used: =TextIf(Exists(%INDI.FAMS>MARR.OBJE>%),"Yes","") where ‘yes’ is returned where a multimedia item is present; blank if not. To this end, I have modified your expression, substituting ‘date’ by ‘obje, but my numerous attempts to incorporate the ‘if text exists’ conditional function to return ‘yes’ or ’blank’ have been unsuccessful. This is the extent to which I have succeeded, which returns the text of the label I have applied to multimedia objects: =Text(TextIf(IsAncestorOf(%INDI.~SPOU>%,FileRoot()),%INDI.FAMS>MARR.OBJE>%,) . TextIf(IsAncestorOf(%INDI.~SPOU[2]>%,FileRoot()),%INDI.FAMS[2]>MARR.OBJE>%,) . TextIf(IsAncestorOf(%INDI.~SPOU[3]>%,FileRoot()),%INDI.FAMS[3]>MARR.OBJE>%,)) Secondly, your expression returned two marriage dates in the same cell for two ancestors. Upon investigation, I find that it relates to married couples with the following Ahnentafel Numbers: AN16 & 17 and AN18 & 19. AN16 and AN19 were both widowed and subsequently married each other. The dates returned equate to their original and second marriages respectively. This is probably quite a rare event, but every possible type of relationship is bound to arise at some time or other. Best regards, Bernard -----Original Message----- Message: 3 Date: Sun, 12 Feb 2012 16:28:34 -0000 From: "Beryl & Mike Tate" <post@tatewise.co.uk> Subject: Re: [FHU] Ancestors' Report Query To: <family-historian-users@rootsweb.com> Message-ID: <000001cce9a3$5e2054e0$1a60fea0$@co.uk> Content-Type: text/plain; charset="utf-8" Bernard, Reading between the lines I believe you are talking about a Query and its Result Set rather than a Report. The tactic to adopt involves the function =IsAncestorOf() to determine which Spouse is the Ancestor of your starting person. Then the function =TextIf() to only show the Marriage Date of the matching Family Event. Then the function =Text() to join these alternatives together. This 1st expression will only show the 1st Marriage Date if the 1st Spouse is an Ancestor of FileRoot(). =TextIf( IsAncestorOf( %INDI.~SPOU[1]>%, FileRoot() ), %INDI.FAMS[1]>MARR[1].DATE:COMPACT%, ) This 2nd expression will only show the 2nd Marriage Date if the 2nd Spouse is an Ancestor of FileRoot(). =TextIf( IsAncestorOf( %INDI.~SPOU[2]>%, FileRoot() ), %INDI.FAMS[2]>MARR[1].DATE:COMPACT%, ) This 3rd expression will only show the 3rd Marriage Date if the 3rd Spouse is an Ancestor of FileRoot(). =TextIf( IsAncestorOf( %INDI.~SPOU[3]>%, FileRoot() ), %INDI.FAMS[3]>MARR[1].DATE:COMPACT%, ) Only one of the above will yield a Marriage Date and the others empty strings. =Text( TextIf( IsAncestorOf( %INDI.~SPOU[1]>%, FileRoot() ), %INDI.FAMS[1]>MARR[1].DATE:COMPACT%, ) . TextIf( IsAncestorOf( %INDI.~SPOU[2]>%, FileRoot() ), %INDI.FAMS[2]>MARR[1].DATE:COMPACT%, ) . TextIf( IsAncestorOf( %INDI.~SPOU[3]>%, FileRoot() ), %INDI.FAMS[3]>MARR[1].DATE:COMPACT%, ) ) Extend as necessary if more than 3 marriages involved. Regards, Mike Tate

    02/13/2012 10:03:53
    1. Re: [FHU] Ancestors' Report Query
    2. Beryl & Mike Tate
    3. Hi Bernard, You should be able to simply replace the %INDI.FAMS>MARR.OBJE>% data reference with the matching TextIf(Exists()) function. Remember to leave off the '=' prefix from the TextIf function. The '=' prefix must only exist on the first function in the nested set of functions. So you should get: =Text( TextIf( IsAncestorOf( %INDI.~SPOU>%, FileRoot() ), TextIf(Exists(%INDI.FAMS>MARR.OBJE>%),"Yes",""),) . TextIf( IsAncestorOf( %INDI.~SPOU[2]>%, FileRoot() ), TextIf(Exists(%INDI.FAMS[2]>MARR.OBJE>%),"Yes",""),) . TextIf( IsAncestorOf( %INDI.~SPOU[3]>%, FileRoot() ), TextIf(Exists(%INDI.FAMS[3]>MARR.OBJE>%),"Yes",""),)) If an Individual marries two genuine Ancestors of your FieRoot() then yes the function will yield two dates. For this reason, where multiple Facts of the same type are likely to arise, it is often better to use a Fact Query instead of an Individual Query. Then all the complications we have been discussing often resolve to a single expression applied to each Fact, without having to worry about multiple instances. Also when two instances satisfy your criteria (like your AN16 & 17 and AN18 & 19) then they appear on two separate rows in the Result Set, with the Owner Individual listed twice. It is quite easy in a Fact Query to reference the Owner Individual and filter them accordingly. See the FHUG Knowledge Base on Creating a Query at http://www.fhug.org.uk/wiki/doku.php?id=how_to:creating_a_query Regards, Mike Tate -----Original Message----- From: family-historian-users-bounces@rootsweb.com [mailto:family-historian-users-bounces@rootsweb.com] On Behalf Of Bernard Sharp Sent: 13 February 2012 17:04 To: family-historian-users@rootsweb.com Subject: Re: [FHU] Ancestors' Report Query Hi Mike, Many thanks for your detailed solution to my question. I copied your expression into my ‘custom query’ (yes, you read my mind about terminology correctly) and got the desired result. This has, however, triggered two further questions: Firstly, the expression I had originally utilised to determine whether my database held a multimedia item for each event date will now require modification to accommodate multiple marriages. This is the expression I used: =TextIf(Exists(%INDI.FAMS>MARR.OBJE>%),"Yes","") where ‘yes’ is returned where a multimedia item is present; blank if not. To this end, I have modified your expression, substituting ‘date’ by ‘obje, but my numerous attempts to incorporate the ‘if text exists’ conditional function to return ‘yes’ or ’blank’ have been unsuccessful. This is the extent to which I have succeeded, which returns the text of the label I have applied to multimedia objects: =Text(TextIf(IsAncestorOf(%INDI.~SPOU>%,FileRoot()),%INDI.FAMS>MARR.OBJE>%,) . TextIf(IsAncestorOf(%INDI.~SPOU[2]>%,FileRoot()),%INDI.FAMS[2]>MARR.OBJE>%,) . TextIf(IsAncestorOf(%INDI.~SPOU[3]>%,FileRoot()),%INDI.FAMS[3]>MARR.OBJE>%,)) Secondly, your expression returned two marriage dates in the same cell for two ancestors. Upon investigation, I find that it relates to married couples with the following Ahnentafel Numbers: AN16 & 17 and AN18 & 19. AN16 and AN19 were both widowed and subsequently married each other. The dates returned equate to their original and second marriages respectively. This is probably quite a rare event, but every possible type of relationship is bound to arise at some time or other. Best regards, Bernard -----Original Message----- Message: 3 Date: Sun, 12 Feb 2012 16:28:34 -0000 From: "Beryl & Mike Tate" <post@tatewise.co.uk> Subject: Re: [FHU] Ancestors' Report Query To: <family-historian-users@rootsweb.com> Message-ID: <000001cce9a3$5e2054e0$1a60fea0$@co.uk> Content-Type: text/plain; charset="utf-8" Bernard, Reading between the lines I believe you are talking about a Query and its Result Set rather than a Report. The tactic to adopt involves the function =IsAncestorOf() to determine which Spouse is the Ancestor of your starting person. Then the function =TextIf() to only show the Marriage Date of the matching Family Event. Then the function =Text() to join these alternatives together. This 1st expression will only show the 1st Marriage Date if the 1st Spouse is an Ancestor of FileRoot(). =TextIf( IsAncestorOf( %INDI.~SPOU[1]>%, FileRoot() ), %INDI.FAMS[1]>MARR[1].DATE:COMPACT%, ) This 2nd expression will only show the 2nd Marriage Date if the 2nd Spouse is an Ancestor of FileRoot(). =TextIf( IsAncestorOf( %INDI.~SPOU[2]>%, FileRoot() ), %INDI.FAMS[2]>MARR[1].DATE:COMPACT%, ) This 3rd expression will only show the 3rd Marriage Date if the 3rd Spouse is an Ancestor of FileRoot(). =TextIf( IsAncestorOf( %INDI.~SPOU[3]>%, FileRoot() ), %INDI.FAMS[3]>MARR[1].DATE:COMPACT%, ) Only one of the above will yield a Marriage Date and the others empty strings. =Text( TextIf( IsAncestorOf( %INDI.~SPOU[1]>%, FileRoot() ), %INDI.FAMS[1]>MARR[1].DATE:COMPACT%, ) . TextIf( IsAncestorOf( %INDI.~SPOU[2]>%, FileRoot() ), %INDI.FAMS[2]>MARR[1].DATE:COMPACT%, ) . TextIf( IsAncestorOf( %INDI.~SPOU[3]>%, FileRoot() ), %INDI.FAMS[3]>MARR[1].DATE:COMPACT%, ) ) Extend as necessary if more than 3 marriages involved. Regards, Mike Tate ------------------------------- To unsubscribe from the list, please send an email to FAMILY-HISTORIAN-USERS-request@rootsweb.com with the word 'unsubscribe' without the quotes in the subject and the body of the message

    02/13/2012 11:33:29