* Marriages again

Older V4 Queries please post for any version in the General Forum
Locked
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Marriages again

Post by rodit » 14 Mar 2012 02:39

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

User avatar
johnmorrisoniom
Megastar
Posts: 882
Joined: 18 Dec 2008 07:40
Family Historian: V7
Location: Isle of Man

Marriages again

Post by johnmorrisoniom » 14 Mar 2012 08:22

copy your expression & replace the number (1) with the number (2) will pick up 2nd marriages (3) will pick 3rd etc.

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Marriages again

Post by Jane » 14 Mar 2012 08:53

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.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Marriages again

Post by tatewise » 14 Mar 2012 12:41

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%) )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Marriages again

Post by PeterR » 14 Mar 2012 14:13

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.
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Marriages again

Post by rodit » 15 Mar 2012 05:16

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

avatar
sdl180
Platinum
Posts: 33
Joined: 20 Jun 2008 16:04
Family Historian: None

Marriages again

Post by sdl180 » 15 Mar 2012 08:08

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.


Image

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

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Marriages again

Post by tatewise » 15 Mar 2012 10:49

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Marriages again

Post by rodit » 16 Mar 2012 05:14

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]

User avatar
tatewise
Megastar
Posts: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Marriages again

Post by tatewise » 16 Mar 2012 11:46

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.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Marriages again

Post by rodit » 17 Mar 2012 06:31

Thanks, Tatewise

Locked