[Wish List Item 598]New data reference index option "[preflast]"
Posted: 07 Mar 2023 14:03
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:
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.
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]%)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.