Page 1 of 1
help with Expressions for icons
Posted: 30 Nov 2012 10:11
by johnmorrisoniom
I am having problems with an expression to show if a multimedia object is attached to a marriage fact.
I have tried:
This works in the main, but not always if there are multiple marriages for each spouse.
I have also tried multiple expressions with a different icon for each expression:
Code: Select all
=Exists(%FAM[1].MARR.OBJE>%)
=Exists(%FAM[2].MARR.OBJE>%)
Again, this works, sort of, but the icons are only showing on one of the partners.
I know there will be an obvious answer, but help please
ID:6617
help with Expressions for icons
Posted: 30 Nov 2012 10:36
by Jane
Each Box has both a Family and Individual record associated. So you will probably need to work from the Individual one as FAM will be the Family Record associated with the box not the person in the box.
Something like
Code: Select all
=Exists(%INDI.FAMS[+1]>MARR.OBJE>%)
might work for you.
help with Expressions for icons
Posted: 30 Nov 2012 10:39
by tatewise
The
[1+] looping index only works in
Diagram Text Schemes not
Box Conditions.
I am not sure why the
[1] and
[2] indexes don't work.
The following Expression does work:
Code: Select all
=IsTrue(Exists(%INDI.FAMS[1]>MARR.OBJE>%) or Exists(%INDI.FAMS[2]>MARR.OBJE>%))
and can be extended to
[3]rd or
[4]th spouse family.
Jane said: FAM will be the Family Record associated with the box
In the case of multiple (FAMS) partners, which Family Record is associated with each Box?
help with Expressions for icons
Posted: 30 Nov 2012 11:46
by johnmorrisoniom
Thanks Mike and Jane,
I have used:
Code: Select all
=Exists(%INDI.FAMS[1]>MARR.OBJE>%)
and
=Exists(%INDI.FAMS[2]>MARR.OBJE>%)
to give different icons for each marriage.
Thanks for your help.
help with Expressions for icons
Posted: 30 Nov 2012 12:26
by tatewise
In such simplified Condition Expressions you don't even need the =Exists() function, because %INDI.FAMS[1]>MARR.OBJE>% and %INDI.FAMS[2]>MARR.OBJE>% are each sufficient.
In case it was not obvious, the Priority of each Condition determines the order of the Icons on the Boxes.
help with Expressions for icons
Posted: 30 Nov 2012 13:00
by Jane
Mike said:
In the case of multiple (FAMS) partners, which Family Record is associated with each Box?
The Ancestor/Descendant box the Family is the family which links them to the tree, for spouse boxes it's the Family which links them to the Ancestor Descendant, this is why Family fields such as Marriage are normally shown on the Spouse box.
help with Expressions for icons
Posted: 30 Nov 2012 15:01
by tatewise
Jane, that works fine for Ancestor boxes where the Family that links them to the tree is the one & only FAMC parent/child Family.
It also works fine for all Descendant/Root boxes with only one FAMS spouse Family.
But Descendant/Root boxes with multiple FAMS spouse Families appear to be associated only with their last Spouse Family.
Thus these Descendant/Root boxes only display an Icon if the Marriage of the last Family meets the Conditions.
This explains why John found his Expressions work mostly, but not always for multiple marriages, bearing mind that the FAM[2] index is ignored.
A further complication is that the associated Family remains set in a Diagram, despite later Spouse Families being added to a Descendant/Root Individual, until a new Diagram is created.