Page 1 of 1
Help with expressions for icons on diagram boxes
Posted: 09 Nov 2016 23:53
by Peter Collier
I have some icons I want to use on diagrams to indicate when I hold a copy of somebody's B, M or D certificate. I need a little help with some expression syntax please.
For birth certificates I use the expression =ContainsText(%INDI.BIRT.SOUR>ABBR%,"Birth Certificate",STD) and I get the result I want. Likewise, for death certificates, I use =ContainsText(%INDI.DEAT.SOUR>ABBR%,"Death Certificate",STD) and the relevant icon is correctly displayed.
However, when it comes to marriage certificates, I'm having no joy. I suspect this is because I am dealing with a family record rather than an individual record, but I can't think how I need to phrase the expressions to work correctly.
At the moment I am using =Exists(%INDI.FAMS>MARR%), =Exists(%INDI.FAMS[2]>MARR%), etc. as a stop-gap measure but, as you would expect, this is displaying the icon when I have any source for a marriage, rather than just a marriage certificate specifically.
By analogy with the birth and death certificates, I have tried =ContainsText(%INDI.FAMS>MARR%,"Marriage Certificate",STD) (and so on for subsequent marriages) but it doesn't work - no icon is displayed at all. Clearly, I am overlooking or missing something.
Can anybody suggest what the correct syntax for the expression should be?
Re: Help with expressions for icons on diagram boxes
Posted: 10 Nov 2016 09:27
by Jane
Re: Help with expressions for icons on diagram boxes
Posted: 10 Nov 2016 10:29
by Peter Collier
No, I'd missed that one. The one disadvantage to such an active forum - so much info to plough through!
Thanks for the pointer, Jane. I'll give that a go and see how I do.
Re: Help with expressions for icons on diagram boxes
Posted: 10 Nov 2016 10:51
by tatewise
Some pieces of advice:
1) Use the contextual data reference %CUR_FAMS>MARR...% to refer to displayed Diagram family
2) By analogy test the Source short title %...MARR.SOUR>ABBR%
It may be more reliable to use %...MARR.SOUR>_TYPE% to test the Source Type code.
Then you can use the slightly more efficient =IsTrue( <type> = "Marriage" ) exact match expression, rather than =ContainsText(...) that has to search the short title.
This assumes you have set the Source Type, as is done automatically by Ancestral Sources.
Re: Help with expressions for icons on diagram boxes
Posted: 10 Nov 2016 11:22
by Peter Collier
Thanks, Mike.
The source type for the BMD certificates I hold is set to Marriage (or Birth or Death as appropriate) but this is also the case for other pertinent sources - parish records, newspaper announcements and so on. To match by type would be easier for sure, but it would return a lot of false positives when I only want to mark that I have a GRO certificate, which is why I have the expression search by the short title.
I suppose I could change the source type to be more specific (say, marriage certificate rather than marriage), but I'm not sure if I want to go down that road. All of my source types at the moment are overarching: birth, marriage, death, military records, newspaper article, personal communications, etc. The more specific details go in the short title (e.g. "Marriage Certificate (UK): 1850 BODGITT John & SCARPER Jane"), which is what I have showing under source records tab as the full title has to contain whatever text I need to make the footnote references display correctly in reports, which isn't always so reader friendly on the source records screeen.
Re: Help with expressions for icons on diagram boxes
Posted: 10 Nov 2016 12:08
by tatewise
OK, you may have to stick with testing the
Short Title.
But as they are so significant I use
Birth Certificate and
Birth Record as
Source Types to differentiate, and similarly for
Marriage and
Death.
However, perhaps you might want to review what the
Diagram Icon is intended to indicate.
Is it to show that research for that event has gone about as far as it can go?
Certainly for
UK post
1837 events the
Certificate is about the best you can expect.
But what about the
UK before 1837 and other countries where there are no BMD Certificates?
Perhaps better criteria are that the event has an exact
Date (dd/mmm/yyyy) and has a
Source Citation of any type.
That would work for
BMD Certifcates but also for earlier records that confirm a
BMD Date.
These criteria have recently been the focus of my new Plugin
Lookup Missing BMD Records discussed in
Automated internet Marriages lookup (14180) and
Look up missing BMD Plugin (14319).
Re: Help with expressions for icons on diagram boxes
Posted: 11 Nov 2016 19:49
by davidf
I have experimented with icons on diagram boxes but ended up abandoning most of it because it ceased to be helpful.
For instance what do you do if someone has married twice but you only have a certificate for one of the marriages?
Ideally what I would like to be able to do is to put the icon next to the fact in the box. I am not sure that this is easily done - and if it was to be you might want some form of tabulation to keep things neat!
Re: Help with expressions for icons on diagram boxes
Posted: 11 Nov 2016 21:02
by tatewise
Use the %CUR~FAMS>MARR.SOUR>...% style of Condition Expression as advised earlier.
Then the Icon will only appear on the Boxes of the two Spouses with the Certificate, and only if both appear in the Diagram together.
If more than one Family couple are shown for multiple Marriages, some with Certifcates and some without, then it is fairly obvious which are which.
If only one Family couple appears in the Diagram, then if a Certificate exists for their Marriage both will have the Icon, but if not then neither will have the Icon.
Although it is not possible to put an Icon on a Fact, it is possible to add textual words or a symbol such as © to indicate a Certificate exists, by Cloning and Editing the Text Scheme. To maintain a tidy layout when extra text is added you could put the optional Certificate text on a new line.
e.g. =TextIf(ContainsText(%CUR~FAMS>MARR.SOUR>TITL%,"Marriage Certificate",STD),"©","")
On a slightly different tack, what are you trying to indicate?
As said earlier, Certificates are only possible in UK for post-1837 registrations.
So what should be indicated for pre-1837 Births, Marriages & Deaths?
See my earlier points about the indication being for completed research for an event.
Re: Help with expressions for icons on diagram boxes
Posted: 12 Nov 2016 00:32
by davidf
On a slightly different tack, what are you trying to indicate?
I tend to use diagrams as my main display during research, so like the diagram boxes to be very rich in terms of detail.
Ideally I would like to be able to see "at a glance" how reliable I feel each fact is and to answer the question "how do I know that?"
So for instance if we are considering a birth, you can deduce quite a lot from the date:
1846 indicates that you have
probably deduced it from an age on a census return
Q4 indicates that you have
probably picked it up from an index of births
12 Dec 1846 Implies that you have seen the actual date -
possibly on a certificate,
possibly in a newspaper or
possibly as part of the narrative in a baptismal record.
But it is so much easier if you can prefix the actual fact with an icon corresponding to the most reliable source - or even sources (in order of reliability). I get the order of reliability from the source order
Prefixing with characters is possible as indicated - but is laborious! to set up (even with some careful cutting/pasting/editing).
Re: Help with expressions for icons on diagram boxes
Posted: 12 Nov 2016 10:20
by tatewise
As they say: "There is no gain without pain".
Setting up a scheme of conditional prefix symbols for key sources is a bit laborious, but no more so than conditional icons.
The prefix symbols will be more compact than icons, so Diagrams will show more boxes in the same size screen.
The setting up only has to be done once, and then you can forget about it.