Occupations in the Records window
Daryl Cogavin
I have added occupations to the columns in the Records window but I have a lot of people listed as scholar where their earliest occupation entry was from a census entry when they were a child. I have later adult occupations for them which I have marked as Preferred in the Focus box but they are still showing as scholar in the Records window.
How can I get the Preferred occupation to show in the Records window ? |
|
John Elvin
I can't think how to get the preferred, but %INDI.OCCU[LAST]% will give you the last which is probably better than you have now.
|
|
Daryl Cogavin
Thanks, John, that's definitely a step in the right direction.
|
|
colevalleygirl@colevalleygirl.co.uk
Try %INDI.OCCU[preferred]%
|
|
Victor Markham
When I go to a persons name I prompt the fact tab and prompt 'add fact' a iist of facts opens. At the bottom is says 'add fact' I prompt this and select 'occupation' which then appears among the fact list It is then simple to add occupation details Victor On 07/03/2023 09:40, Daryl Cogavin via
groups.io wrote:
I have added occupations to the columns in the Records window but I have a lot of people listed as scholar where their earliest occupation entry was from a census entry when they were a child. I have later adult occupations for them which I have marked as Preferred in the Focus box but they are still showing as scholar in the Records window. |
|
colevalleygirl@colevalleygirl.co.uk
Victor, the question is about how to display the preferred occupation in the Records window, not how to create it.
From: family-historian@groups.io <family-historian@groups.io> On Behalf Of Victor Markham via groups.io
Sent: Tuesday, March 7, 2023 10:36 AM To: family-historian@groups.io Subject: Re: [family-historian] Occupations in the Records window
When I go to a persons name I prompt the fact tab and prompt 'add fact' a iist of facts opens. At the bottom is says 'add fact' I prompt this and select 'occupation' which then appears among the fact list It is then simple to add occupation details Victor _._,_._,_ |
|
Daryl Cogavin
Thank you, cvg, that worked a treat.
|
|
John Elvin
I'm thinking there may be a way to make it display the preferred if there is one, but otherwise display the last. That way you'd only have to set preferred when the last wasn't the one you wanted.
|
|
John Elvin
Cracked it:
=TextIf(IsSet(%INDI.OCCU[preferred]._FLGS.__PREFERRED%),%INDI.OCCU[preferred]%,%INDI.OCCU[last]%) Something that had me fooled for a moment; the order of the occupations in the Facts tab may not be the same as that in the All tab and it's the order in the all tab that matters. If you get this you need to Sort Family & Events in Date Order. |
|
John Elvin
OR use Tools, Re-Order Out-of-Sequence Data... to
make sure everything is in the correct order first. On 07/03/2023 11:03, John Elvin wrote:
Cracked it: |
|
John Elvin
I've just looked at the Occupation on the Main tab of the individual property box. That is set as INDI.OCCU[preferred].
Being able to set that using the expression I gave would be an improvement as I suspect many users see At School or Scholar on a lot of individuals. But functions can't be used at present; there's a wish list item requesting that they could be used. Please vote for https://www.fhug.org.uk/wishlist/wldisplay.php?wlwlref=474 |
|
John Elvin
Just to wrap this up, a new wish list item has been raised to request a new index option [preflast].
This would allow the occupation on the property box Main tab to be set as %INDI.OCCU[preflast]%. If a preferred occupation had been set, that would be displayed, otherwise the last occupation would be displayed (currently it defaults to the first which may be "Scholar" or similar). It would also be usable for other facts where there may be multiple occurrences and simplify some queries where getting the result requires a more complex expression. If this is something that you would like to see implemented, please vote for https://www.fhug.org.uk/wishlist/wldisplay.php?wlwlref=598 |
|