Page 1 of 1
Using Occupation in diagram boxes
Posted: 15 May 2013 14:05
by stbaldock
I would like to use a 'general' occupation for individuals, within diagram boxes, yet the Edit Text Scheme only allows All, First or Last.
There is a field called 'Occupation' in each individual's property window, which I assume can be used to over-ride other Occupations.
How is this referenced? Can it be used in the Text Scheme?
I'd rather not list them all, or 'first' (which is inevitably 'Scholar'), or 'last' (which is inevitably 'Pensioner' or the like...)
Thanks.
[confused]
ID:6946
Using Occupation in diagram boxes
Posted: 15 May 2013 14:30
by Jane
stbaldock said:
There is a field called 'Occupation' in each individual's property window, which I assume can be used to over-ride other Occupations.
The Occupation on the main tab, is simply the first Occupation on the persons record eg %INDI.OCCU[1]%
Currently it's not possible to select a preferred occupation, but you could set up a custom fact for Main Occupation and use that in preference if set and default to the first occupation if it's not set.
Using an expression like
Code: Select all
=ItemIf(Exists(%INDI._ATTR-MAIN_OCCUPATION%),
%INDI._ATTR-MAIN_OCCUPATION%,%INDI.OCCU%)
Using Occupation in diagram boxes
Posted: 15 May 2013 14:51
by stbaldock
Thanks for the prompt reply as ever, Jane.
I've created the Custom Fact (my first!), yet the Text if 'No Data' just literally displays '%INDI.OCCU[1]%', not the value.
Am I being stupid?
I can't believe FH is so customisable - I know there is so much under the hood, yet have little time to play!
Sounds like a candidate for a book - 'Mastering & Manipulating Family Historian Data' perhaps?![wink]
Using Occupation in diagram boxes
Posted: 15 May 2013 15:28
by tatewise
I don't know if your reference to 'TextIf' is a typo, but if you check with Jane's example it should be ItemIf.
That might explain why it is displaying as text, especially as you appear to have enclosed it in quotes '%INDI.OCCU[1]%'.
Using Occupation in diagram boxes
Posted: 15 May 2013 17:47
by Jane
The expression I gave you needs to go in the expression box not the text if no data box. All on one line.
Using Occupation in diagram boxes
Posted: 15 May 2013 19:11
by tatewise
Like the following, assuming your Custom Fact is an
Attribute named
Main Occupation:
