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.