* Displaying Occupations in Diagrams

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
leperstone
Newbie
Posts: 2
Joined: 26 Jan 2014 15:20
Family Historian: V5

Displaying Occupations in Diagrams

Post by leperstone » 26 Jan 2014 15:42

An individual may through different sources have their occupation recorded as a fact many times over the lifetime. Often the occupation remains the same. Any diagram text options I have tried that list occupations seem to show all occupation data for an individual making the diagrams untidy.

I want to be able to select/show one occupation entry only for an individual in diagrams, Is this possible. Any help would be appreciated

User avatar
AdrianBruce
Megastar
Posts: 1962
Joined: 09 Aug 2003 21:02
Family Historian: V7
Location: South Cheshire
Contact:

Re: Displaying Occupations in Diagrams

Post by AdrianBruce » 26 Jan 2014 16:24

Multiple value items generally show something like %INDI.NAME[2+]:FULL%

OK, that's for name, not occupations, but the crucial bit is that [2+]. This says, show "occurrence two upwards". So the multiple occurrences of occupation probably have [1+]. If you remove the whole thing in square brackets (e.g. to make %INDI.NAME:FULL% ) then you will see just the first occurrence of occupation.

Now, of course, someone's first occupation may not be the one you want to show, so you have two choices.

1. Shuffle the facts up and down so that the most important occupation is always first. Or...
2. Create a new custom fact (an attribute) to be used exclusively for holding a bit of text that you want to appear against that person in a diagram. For instance, I created a custom attribute "zDiagram Note" (no quotes in the real fact name) to hold things like someone's main occupation or where they were suspected to be from or... Then this is printed with the line
(%INDI._ATTR-ZDIAGRAM_NOTE%)
in the relevant text scheme to show the note in brackets.
Adrian

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

Re: Displaying Occupations in Diagrams

Post by tatewise » 26 Jan 2014 17:20

Other users have a similar requirement, and it has been suggested that what is needed is some way to indicate which Occupation entry is the Primary one, but nothing has been provided yet.

However, there are a number of ways to achieve what you ask for.

(1) Custom Attribute
You could create a Custom Attribute for Primary Occupation and then the Text Scheme would simply display that Custom Attribute as per Adrian's suggestion above.
The Template would be similar to:

Code: Select all

Occup. %INDI._ATTR-PRIMARY_OCCUPATION%
However, you may also want to exclude that Custom Attribute from Reports to avoid duplication.

(2) Unique Occupation
Where an Individual has multiple Occupation Attributes there needs to be something to make one of them unique.
Two suggestions are to use the Cause field or the Source Note field, neither of which are likely to be used in practice for anything else.
You will have to use the All tab to add a value such as Primary to either such field for the chosen Occupation.
Then the Text Scheme must selectively display just that Occupation by using a Template such as:

Code: Select all

Occup. =TextIf(%INDI.OCCU.CAUS%="Primary",%INDI.OCCU%,TextIf(%INDI.OCCU[2].CAUS%="Primary",%INDI.OCCU[2]%,TextIf(%INDI.OCCU[3].CAUS%="Primary",%INDI.OCCU[3]%,)))
Simply use SOUR2 instead of CAUS to test the Source Note instead of Cause field.

You will have to keep nesting TextIf() functions until enough Occupations are supported.
If there are a lot, the Template may get too long, and then you will need to repeat the Text Scheme item for the larger indexes.

Explanation:
The basic =TextIf( condition, true-text, false-text ) function is:
=TextIf(%INDI.OCCU.CAUS%="Prime",%INDI.OCCU%,)
In this case if the 1st Occupation is Prime then it is displayed, otherwise, nothing is displayed.

The blank false-text parameter must be replaced by a nested TextIf() function:
=TextIf(%INDI.OCCU.CAUS%="Prime",%INDI.OCCU%,TextIf(%INDI.OCCU[2].CAUS%="Prime",%INDI.OCCU[2]%,))
Now if the 1st Occupation is NOT Prime, but the 2nd Occupation is Prime then it is displayed.

This pattern can be repeated for the 3rd, 4th, etc, Occupation until the Template becomes too long.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Re: Displaying Occupations in Diagrams

Post by PeterR » 26 Jan 2014 18:39

If you always want to show the last Occupation, you can use:

Code: Select all

%INDI.OCCU[last]%
or, to show the relevant Place as well:

Code: Select all

%INDI.OCCU[last]%, %INDI.OCCU[last].PLAC:SHORT%
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)

Post Reply