Page 1 of 1

[Wish List Item 598]New data reference index option "[preflast]"

Posted: 07 Mar 2023 14:03
by jelv
Issue: When displaying the occupation the best option is %INDI.OCCU[preferred]%. The data reference for the occupation on the main tab of the property box uses this (without the %). The problem is that if no occupation has been flagged as preferred it defaults to the first, and frequently this will be from a census when they were very young so will be "Scholar" or "At School" - as much use as a chocolate fireguard!

In queries and in the records window this expression will give the preferred if one is flagged, otherwise it gives the last which is more likely to be useful:

Code: Select all

=TextIf(IsSet(%INDI.OCCU[preferred]._FLGS.__PREFERRED%),%INDI.OCCU[preferred]%,%INDI.OCCU[last]%)
But you can't use expressions for the data references when customising the property box (yet - hopefully).

Proposal: A new data reference index option [preflast] which, if none of the facts is flagged as preferred, defaults to the last not the first.

So the expression above would be replaced by %INDI.OCCU[preflast]% which could also be used on the property box.

Re: New data reference index option "[preflast]"

Posted: 31 May 2023 23:03
by jelv
I see Mark has suggested that this is closed as no support; but I'm wondering if the lack of comments was due to lack of interest or because the proposal was succinct and well defined.

I raised it because of this discussion: https://groups.io/g/family-historian/to ... 45937#6589

Re: New data reference index option "[preflast]"

Posted: 01 Jun 2023 07:36
by Mark1834
I’ll buy that. As a general point, I think we should be careful about introducing too many new items until the backlog is cleared, but this is simple and well-defined.

Re: New data reference index option "[preflast]"

Posted: 03 Jun 2023 13:07
by ColeValleyGirl
Wish List Item 598 has been raised.