* Occupation icons in Diagrams

Questions about creating, customising and using diagrams and charts
Post Reply
User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Occupation icons in Diagrams

Post by rodit » 01 Aug 2023 05:51

I use icons in Diagrams to show all sorts of things - Immigration, BMD's, Occupations, etc.
Looking over one family of Miners/Colliers in the Yorkshire mines, I noticed that there was no icon for one who had been a Collier.
The Expression I have always used to generate the required icon is:-
=IsTrue(ContainsText(%INDI.OCCU[1+]%,"miner",STD) or ContainsText(%INDI.OCCU[1+]%,"collier",STD))
It finally dawned on me that his icon was not showing because this was his second listed Occupation. His first was that of electrician. I believe that this is the reason, but have been unable to resolve the problem, even though I have ploughed through the KB and a number of topics.
Perhaps Mike Tate could point me in the right direction.
Thanks in advance
Roger

User avatar
sbell95
Famous
Posts: 107
Joined: 14 Feb 2021 06:04
Family Historian: V7
Location: Australia

Re: Occupation icons in Diagrams

Post by sbell95 » 01 Aug 2023 06:16

Roger,

From what I understand, you must iterate through all of the possible occupations manually by index, so my guess would be adding additional expressions which refer to %INDI.OCCU[2]%,"miner",STD, %INDI.OCCU[3]%,"miner",STD, etc, in order to capture all possible occupations of a person. I suppose that is what you've tried to do with the [1+] notation, but I've not seen that before...

Related topic - https://www.fhug.org.uk/forum/viewtopic ... 584#p85584
Sarah Bell – Australia
View my tree on Wikitree

avatar
jelv
Superstar
Posts: 359
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Occupation icons in Diagrams

Post by jelv » 01 Aug 2023 08:00

Would making it the preferred occupation and adjusting the expression accordingly work for you? If there is no preferred it defaults to the first so you'd only have to set preferred on the individuals where it wasn't the first.

Edit to add screen shot.
Attachments
Preferred occupation.png
Preferred occupation.png (34.3 KiB) Viewed 437 times
Last edited by jelv on 01 Aug 2023 08:21, edited 1 time in total.
John Elvin

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

Re: Occupation icons in Diagrams

Post by tatewise » 01 Aug 2023 08:19

Roger, the [1+] looping index only works in Text Schemes and nowhere else.

So if you want icons for such Occupations you must use one of the techniques suggested by Sarah and John.

This is one of the scenarios where it might be easier to have a Record Flag for each type of Occupation and apply the icon when the Record Flag is set.

BTW: I have never quite understood why the [1+] looping index only applies to Text Schemes.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
rodit
Famous
Posts: 228
Joined: 02 Feb 2008 02:39
Family Historian: V7
Location: Wollongong, New South Wales, Australia

Re: Occupation icons in Diagrams

Post by rodit » 02 Aug 2023 05:31

Thanks to you all. I will take the suggestions on board and see hoe I go.
Roger

User avatar
ississi
Diamond
Posts: 59
Joined: 15 Feb 2021 14:47
Family Historian: V7

Re: Occupation icons in Diagrams

Post by ississi » 02 Aug 2023 07:32

how would you change the equation to use the Preferred occupation, then? thanks

avatar
jelv
Superstar
Posts: 359
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Occupation icons in Diagrams

Post by jelv » 02 Aug 2023 07:54

%INDI.OCCU[preferred]%
John Elvin

avatar
jelv
Superstar
Posts: 359
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Occupation icons in Diagrams

Post by jelv » 02 Aug 2023 08:02

Incidently, often the occupation that is most pertinent is not the first one so in the absence of a preferred it would be best if it defaulted to the last (e.g. if the first is "Scholar" from a census).

There's a wish list item asking for a new index option that does that - if this is something you'd like to see added to FH please vote for it.

New data reference index option "preflast"
John Elvin

Post Reply