Page 1 of 1

Recording twins

Posted: 16 Jul 2012 22:28
by neil40
Other than the fact that 2 children have the same birth date recorded, how do you denote that they are in fact twins, or triplets etc.

Thanks for your thoughts
Neil

ID:6401

Recording twins

Posted: 17 Jul 2012 00:04
by tatewise
Where do you want the denotion to appear?

You could add a Record Flag named Twin to them both.

On Diagrams you could add an Icon or some other feature to their boxes.
This can be enabled using a Diagram > Options > Boxes tab Condition such as a Record Flag or an Expression.
The Expression would be something like:
=IsTrue(
(Not(IsSameItem(%INDI%,%INDI.~FATH>~CHIL[1]>%)) and (Diff(DayNumber(%INDI.BIRT.DATE%),DayNumber(%INDI.~FATH>~CHIL[1]>BIRT.DATE%)) ~CHIL[2]>%)) and (Diff(DayNumber(%INDI.BIRT.DATE%),DayNumber(%INDI.~FATH>~CHIL[2]>BIRT.DATE%)) ~CHIL[3]>%)) and (Diff(DayNumber(%INDI.BIRT.DATE%),DayNumber(%INDI.~FATH>~CHIL[3]>BIRT.DATE%)) ~CHIL[4]>%)) and (Diff(DayNumber(%INDI.BIRT.DATE%),DayNumber(%INDI.~FATH>~CHIL[4]>BIRT.DATE%)) < 2))
)

which works for up to 4 siblings but can easily be extended.
It automatically detects any siblings whose birth dates are within 1 day of each other.
This detects not only Twins, but also Triplets, Quads, etc.

It works by checking the INDIvidual is not the same as their FATHer's 1st CHILd, but their BIRT.DATE Diff is < 2 Days.
Then repeating for 2nd, 3rd, and 4th CHILd.

Recording twins

Posted: 17 Jul 2012 07:51
by Jane
Mike, a slightly simpler expression is

=IsTrue(
(%INDI.BIRT.DATE% = Field(NextSib(%INDI%),'INDI.BIRT.DATE')
)
or
(%INDI.BIRT.DATE% = Field(PrevSib(%INDI%),'INDI.BIRT.DATE')
)
)

I also add a note to twins and other multiple births listing the other multiples.

Recording twins

Posted: 17 Jul 2012 09:29
by tatewise
Wow, yes, when did NextSib() and PrevSib() functions arrive? I didn't spot them.

I would still allow a day difference in dates just in case they were born over midnight.

=IsTrue(
 (
   Diff( DayNumber(%INDI.BIRT.DATE%), DayNumber(Field(NextSib(%INDI%),'INDI.BIRT.DATE')) ) < 2
 ) or
 (
   Diff( DayNumber(%INDI.BIRT.DATE%), DayNumber(Field(PrevSib(%INDI%),'INDI.BIRT.DATE')) ) < 2
 )
)

Recording twins

Posted: 17 Jul 2012 09:34
by Jane
, when did NextSib() and PrevSib() functions arrive? I didn't spot them
V4.0 so they have been there a while.

Recording twins

Posted: 17 Jul 2012 09:50
by neil40
Thank you for the replies.

I've no idea yet how to apply expressions to diagrams, but I will find out.

So, I have created a 'Flag' called 'Twins' and applied it to the children of my second cousin.
What would be nice, is to somehow see Flags that are applied to an individual (even the 'Living' one!) in 'Spouses and Children' View etc, otherwise what is the use of them other than reporting?
It would be useful to tell that I had set 'Twins' Flag to John and James Doe at some point in the future when I've long forgotten I did so!
Would also be nice to show, once flagged, somehow in the Publish tools like Family Group Sheet, Descendants by Generation etc.

Are those possible?

Recording twins

Posted: 17 Jul 2012 12:53
by tatewise
I would advise using the Expression wherever possible instead of Record Flags because it is automatic.
You don't have to remember to set Record Flags every time you find Twins. Triplets, Quads, etc, and so you won't forget where you set them.

To customise Diagrams use Options > Boxes tab Expression and insert the Expression from above.
Note that it must all be on one line, so first Copy & Paste to say Notepad and remove the newline breaks, then Copy & Paste to Expression field.
Having done that, you can choose what Box Features you want to indicate multiple births, such as an Icon.

Unfortunately you cannot tailor the Focus Window views.

You can add a Column to the Records Window view using the same Expression.

You can add a field to many Published Reports using Options > Contents tab Add and enter Label such as Multi-Birth and Expression as above again.

See Using Flags and Icons for further info including worked examples.

Recording twins

Posted: 17 Jul 2012 22:35
by David_Lewis
I've been using a flag and named it twin and then attaching an icon to that flag. It's simple and works for me.

However of course I may have missed some twins so having an expression that finds those that I have missed would be great.

When I upgrade to version 5 I will give those above a try.

Recording twins

Posted: 17 Jul 2012 23:59
by tatewise
David, you don't have to use FH V5, those features are all in FH V4.

Recording twins

Posted: 18 Jul 2012 08:52
by David_Lewis
Yes but I'm still on version 3

Recording twins

Posted: 18 Jul 2012 13:27
by johnmorrisoniom
Jane,
How would I use your expression in a query to find multiple births, so that I can check that they are correct?

Recording twins

Posted: 18 Jul 2012 13:35
by tatewise
In an Individual Query, simply use it as the Row Filter Expression along with Condition of Add if and Operator of is true.

This will list everyone with siblings born on the same date.

Recording twins

Posted: 18 Jul 2012 15:20
by johnmorrisoniom
Mike or Jane
I have started a new custom query called Multiple Births.
Columns are
Individual: DOB:(sorted Ascending) Place of Birth(Tidy)
On rows I have set Add If....
I enter either your expression, or Jane's (without the =IsTrue
but I am not getting the option to choose the operator 'Is True' as all the operator options are blank.
I am on 5.0.7. Am I missing something out?

Recording twins

Posted: 18 Jul 2012 15:55
by tatewise
Don't leave out =IsTrue

Recording twins

Posted: 18 Jul 2012 16:29
by johnmorrisoniom
Thanks Mike,
All working now.