* Sources

Older V4 Queries please post for any version in the General Forum
User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Sources

Post by tatewise » 12 Mar 2012 21:33

Yes, use the following Expression:
=ContainsText(%INDI.BIRT.SOUR>TITL%,'BMD - England',STD)

This checks that the first Birth Citation refers to a Source Record with a Title/Name of BMD - England (or whatever Title/Name you want).

( If you use the Short Title then use ABBR in place of TITL )

Note that for this to work your BMD - England Source Citation MUST be the first one listed in the yellow Sources Pane.

avatar
Robert129
Diamond
Posts: 83
Joined: 10 Feb 2007 13:53
Family Historian: V6

Sources

Post by Robert129 » 13 Mar 2012 20:12

Mike

Thank you that works perfectly.

As an aside because I have Births from 5 countries I have set up 5 Expressions. Do I need to do that or can I embed all the countries into 1 Expression or is it best to leave them as separate ones? The same applies for Marriages and Deaths.

Robert

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

Sources

Post by johnmorrisoniom » 13 Mar 2012 21:06

Personally , I would reccommend 1 source = 1 expression. That way you can have different Icons for each if you want.

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

Sources

Post by tatewise » 13 Mar 2012 22:08

I tend to side with John, but you can have one Expression if you wish.

The ContainsText function describes its 2nd parameter thus:
The search text to check. This can contain more than one word. A field is deemed to match the text if it contains all of the words in the search text. However, they do not have to be whole word matches (e.g. “Hampshire” will match “Shire”), case does not have to match, and the words do not have to be in the same order, contiguous, or even close to each other, in the field in question.
So the Source Title does not have to be an exact match for the text.
It only has to match enough words to uniquely identify it.

So the following would work providing no other conflicting Source Titles contain both BMD and - (hyphen counts as a word).

=ContainsText(%INDI.BIRT.SOUR>TITL%,'BMD -',STD)

Otherwise, you could use a Boolean Expression such as:

=Bool( ContainsText(%INDI.BIRT.SOUR>TITL%,'BMD - England',STD) or ContainsText(%INDI.BIRT.SOUR>TITL%,'BMD - Australia',STD) or ContainsText(%INDI.BIRT.SOUR>TITL%,'BMD - New Zealand',STD) )

Locked