* Using Occupation in diagram boxes

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
stbaldock
Platinum
Posts: 36
Joined: 28 Dec 2008 02:05
Family Historian: V7
Contact:

Using Occupation in diagram boxes

Post by stbaldock » 15 May 2013 14:05

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

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Using Occupation in diagram boxes

Post by Jane » 15 May 2013 14:30

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%)
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
stbaldock
Platinum
Posts: 36
Joined: 28 Dec 2008 02:05
Family Historian: V7
Contact:

Using Occupation in diagram boxes

Post by stbaldock » 15 May 2013 14:51

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]

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

Using Occupation in diagram boxes

Post by tatewise » 15 May 2013 15:28

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]%'.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Jane
Site Admin
Posts: 8441
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Using Occupation in diagram boxes

Post by Jane » 15 May 2013 17:47

The expression I gave you needs to go in the expression box not the text if no data box. All on one line.
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: 27082
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Using Occupation in diagram boxes

Post by tatewise » 15 May 2013 19:11

Like the following, assuming your Custom Fact is an Attribute named Main Occupation:

Image
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply