Page 1 of 1
Marriages again
Posted: 14 Mar 2012 02:39
by rodit
Continuing on with my Marriage certificate entries. In the Notes section of the Marriage Source Box, I enter 'copy of marriage cert' in the cases where I possess one. I have written a small query which places a M flag against the people with this Note. However, I have found out that if it is a second marriage, the flag does not appear. How can I fix this, please.
The expression I use is
%INDI.FAMS[1]>MARR[1].SOUR[1].NOTE2[1]%
Thanks in advance.
Roger
ID:6012
Marriages again
Posted: 14 Mar 2012 08:22
by johnmorrisoniom
copy your expression & replace the number (1) with the number (2) will pick up 2nd marriages (3) will pick 3rd etc.
Marriages again
Posted: 14 Mar 2012 08:53
by Jane
You don't say where you are using this information, but if you are doing expressions on boxes you might be better using
%FAM.MARR.SOUR.NOTE2%
as each diagram box has both a Family and an Individual context.
If following John's method remember it's FAM[2] not MARR[2] you want.
Marriages again
Posted: 14 Mar 2012 12:41
by tatewise
May I ask the purpose of your
M Flag?
If it is
only used to add an
Icon to your
Diagram Boxes then there is another way.
Forget about
Flags and
Queries and instead use
Diagram > Options > Boxes > Condition > Expression.
Once the
Expression is set up, you never need to keep running a
Query to set a
Flag to display an
Icon.
In your case the
Condition > Expression would be:
=Bool( Exists(%INDI.FAMS>MARR.SOUR.NOTE2%) or Exists(%INDI.FAMS[2]>MARR.SOUR.NOTE2%) )
See the
Knowledge Base advice on
Using Flags and Icons for more details.
[NOTE]
For reasons I do not understand the following does not work for 2nd and subsequent Families.
Perhaps someone more experienced that I can explain.
=Bool( Exists(%FAM.MARR.SOUR.NOTE2%) or Exists(%FAM[2].MARR.SOUR.NOTE2%) )
Marriages again
Posted: 14 Mar 2012 14:13
by PeterR
It seems that the index for FAM is ignored.
The expression =exists(%FAM[3].MARR.SOUR.NOTE2%) has exactly the same effect in a Box Condition as Jane's =exists(%FAM.MARR.SOUR.NOTE2%). The Flag is always shown for the relevant Marriage box but not always for both spouses, depending on the diagram type.
Marriages again
Posted: 15 Mar 2012 05:16
by rodit
Thanks for all the interest and assistance. However, maybe I should clarify my question.
I have 2 paternal ancestors who both married twice. Also (as assumed) I wanted to insert a M icon onto the relevant diagrams. (I have learnt the difference between Flags and Icons).
In one case I have a marriage cert for husband and SECOND wife; in the second case I have marriage certs for husband and BOTH the wives.
When I run my original Query
%INDI.FAMS[1]>MARR[1].SOUR[1].NOTE2[1]%
I get the following responses:
Case 1 - Husband not in Result Set and no icon on husband's diagram - 2nd wife in Result Set, with icon on diagram.
Case 2 - All 3 in Result Set and icons on all 3 diagrams.
I tried the Box Expression but was unsure how to finish them. I will have to go to the knowledge base as suggested.
Roger
Marriages again
Posted: 15 Mar 2012 08:08
by sdl180
Hi Roger,
I am not an expert, but I managed to get multiple marriage icons working on my diagrams by piecing together various examples from posts on here and the help files.
The expression I used was...
=IsTrue(ContainsText(%INDI.FAMS[2]>MARR.PLAC%,'Canada',STD) and Exists(%INDI.FAMS[2]>MARR.SOUR>%))
...for the second marriage. I have similar expressions for the 1st, 3rd and 4th marriages. I also have similar expressions where I do not have a source, which give a faded icon.
Although this is not exactly what you are after, it may help in piecing together one that suits you.
Best of luck.
Steve
Marriages again
Posted: 15 Mar 2012 10:49
by tatewise
Roger said
When I run my original Query %INDI.FAMS[1]>MARR[1].SOUR[1].NOTE2[1]% I get the following responses:
Case 1 - Husband not in Result Set and no icon on husband's diagram - 2nd wife in Result Set, with icon on diagram.
Case 2 - All 3 in Result Set and icons on all 3 diagrams.
That is explained as follows:
Case 1 - Husband's SECOND Marriage is
%INDI.FAMS[2]>MARR[1]... and so does not match
%INDI.FAMS[1]>MARR[1]....
Case 1 - Wife's FIRST Marriage so it matches Query.
Case 2 - Husband's FIRST Marriage matches Query (SECOND Marriage does not, but he is already in Result Set).
Case 2 - Both Wives FIRST Marriage so both match Query.
Add the Rows Filter Data Reference
%INDI.FAMS[2]>MARR[1].SOUR[1].NOTE2[1]% to Query and SECOND Marriages will match.
Similarly
%INDI.FAMS[3]>MARR[1].SOUR[1].NOTE2[1]% for THIRD Marriages.
Roger said
I tried the Box Expression but was unsure how to finish them.
Not sure what you mean, but I assume you used
Diagram > Options > Boxes > Condition > Expression and entered
=Bool( Exists(%INDI.FAMS>MARR.SOUR.NOTE2%) or Exists(%INDI.FAMS[2]>MARR.SOUR.NOTE2%) or Exists(%INDI.FAMS[3]>MARR.SOUR.NOTE2%) ).
( As Steve said,
=IsTrue(...) is an alternative to
=Bool(...) )
Then select this
Expression in the
Condition list and click
Edit Features button at bottom.
In the
Box Features window select the same
Icon as you chose for your
Record Flag Condition before.
Marriages again
Posted: 16 Mar 2012 05:14
by rodit
Eureka! I now have an Expression up and running. Thanks Tatewise and sdl180.
How do I modify these to show Births and Deaths? I have a note in the source if I have a copy of those documents, as for Marriages.
Thanks
Roger[smile]
Marriages again
Posted: 16 Mar 2012 11:46
by tatewise
Use two other simple Conditions.
Birth Expression is %INDI.BIRT.SOUR.NOTE2%
Death Expression is %INDI.DEAT.SOUR.NOTE2%
The way to create these simpler Data References is to use the > and the first Note.
You will see the Data Reference constructed at the top.
Click OK.
Initially each field has the default index [1] but this is automatically removed when the Expression is saved.
All this assumes you only ever have one Birth Event and one Death Event per Individual, and only one Source Citation Note per Event.
If this assumption is false, then you will need a more complex Expression as for Marriages above, with index [2] for any multiple instances.
e.g.
%INDI.BIRT[2].SOUR.NOTE2% for multiple Birth Events.
%INDI.BIRT.SOUR[2].NOTE2% for multiple Source Citations.
Marriages again
Posted: 17 Mar 2012 06:31
by rodit
Thanks, Tatewise