* Marriage cert icon but not index icon in charts

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
charliesb
Newbie
Posts: 4
Joined: 01 Jan 2007 18:28
Family Historian: V7
Location: Brighton, UK

Marriage cert icon but not index icon in charts

Post by charliesb »

I want to display two chart icons for the presence of (1) a marriage certificate and (2) other non-certificate marriage sources but, where a certificate is present, to suppress the icon for other sources. I'd like have a separate icon for each marriage of an individual too.

I have successfully done this for other events, e.g. birth by using the following expressions to apply a Birth cert icon or a Birth record icon:

=ContainsText(%INDI.BIRT.SOUR>TITL%,"Birth cert",STD)

and

=IsTrue(ContainsText(%INDI.BIRT.SOUR>TITL%,"Birth",STD) and Not(ContainsText(%INDI.BIRT.SOUR>TITL%,"Birth cert",STD)))

I can successfully display a Marriage cert icon for first and second marriages using:

=ContainsText(%INDI.FAMS>MARR.SOUR>TITL%,"Marriage cert",STD)
=ContainsText(%INDI.FAMS[2]>MARR.SOUR>TITL%,"Marriage cert",STD)


and also an icon for any marriage source using:

=ContainsText(%INDI.FAMS>MARR.SOUR>TITL%,"Marriage",STD)

but have so far failed in suppressing the non-cert source icon when a certificate is present using:

=IsTrue(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%”Marriage”,STD) and Not(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%”Marriage cert”,STD))))

or

=IsTrue(ContainsText(%CUR~FAMS>MARR.SOUR>TITL%”Marriage”,STD) and Not(ContainsText(%CUR~FAMS>MARR.SOUR>TITL%”Marriage cert”,STD))))

I'm not sure where I am going wrong and am aware that marriages are a bit more complicated. I know I could use source type but at the moment my source types do not differentiate between types of marriage.

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

Re: Marriage cert icon but not index icon in charts

Post by tatewise »

There is no particular reason why the Expressions should not work for Marriage events the same as any other fact.

If you have Copy & Pasted the Expressions there are several syntax errors in
=IsTrue(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%”Marriage”,STD) and Not(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%”Marriage cert”,STD))))

The commas are missing between >TITL% and "Marriage and there are too many closing parentheses.

There must be some explanation for the symptoms.
Remember that those Expressions only work for the 1st MARR fact in the Family record and its 1st Source Citation.

EDIT: Further thoughts...
Have you checked every Marriage? Does the problem affect them all or only a minority?
In the cases that fail, do both Icons get displayed or what?
I have experimented with your Expressions and they seem to work fine.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
charliesb
Newbie
Posts: 4
Joined: 01 Jan 2007 18:28
Family Historian: V7
Location: Brighton, UK

Re: Marriage cert icon but not index icon in charts

Post by charliesb »

Thank for your replies Mike. I apologise I did not make it clear that I did not get as far as you thought - the expressions are not accepted - I still get the "Expression is not valid" error for the corrected versions:

=IsTrue(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%,”Marriage”,STD) and Not(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%,”Marriage cert”,STD)))

and for

=IsTrue(ContainsText(%CUR~FAMS>MARR.SOUR>TITL%,”Marriage”,STD) and Not(ContainsText(%CUR~FAMS>MARR.SOUR>TITL%,”Marriage certificate”,STD)))

I can't see any further errors (mind you, I didn't first time round)
User avatar
Jane
Site Admin
Posts: 8508
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Marriage cert icon but not index icon in charts

Post by Jane »

Part of the problem might be you have "smart" quotes rather than standard ones. One of the pitfalls of putting it near Ms Word I expect.

Try

Code: Select all

=IsTrue(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%,"Marriage",STD) and
Not(ContainsText(%INDI.FAMS>MARR.SOUR>TITL%,"Marriage cert",STD)))
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: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Marriage cert icon but not index icon in charts

Post by tatewise »

Yes, it would have been more helpful if you said you could not even enter the Expressions successfully :D

Are you using Word to compose Expressions before entering them into FH?
Instead, use Windows Notepad or some other plain text editor so you don't get 'smart' opening/closing quotes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
charliesb
Newbie
Posts: 4
Joined: 01 Jan 2007 18:28
Family Historian: V7
Location: Brighton, UK

Re: Marriage cert icon but not index icon in charts

Post by charliesb »

Thank you Jane, I would not have spotted that ever! Interestingly, there must have been other formatting glitches too because just replacing the smart quotes did not work, but recreating the expression from scratch again in FH (and avoiding any text editors) has got me past the Invalid error.
Thank you to Mike too
avatar
charliesb
Newbie
Posts: 4
Joined: 01 Jan 2007 18:28
Family Historian: V7
Location: Brighton, UK

Re: Marriage cert icon but not index icon in charts

Post by charliesb »

Thanks Mike. I was using a plain text editor but looked into its settings to find it was set for smart quotes. All solved now and icons displaying as desired.
Post Reply