Subject: RE: @DBLookup with multivalue field as key
If you @DbLookup using a multivalue as a key, Notes will try to find a match for each value and return a list of the matching results. If a non-matching key is found, only the results for the previous keys are returned. If the first key is a no-match Notes returns an error. [thanks to Haydn Parker for the correction]
So, if you’re certain that there’s exactly one match for each key, you could do something like this:
You still need the error testing even if you’re sure of your data, because lookups can fail for other reasons, e.g. the user lost their connection to the server.
In situations where you’re not certain that there’s only one match for each code, you could use @Transform to lookup each element of Codes with a separate @DbLookup and use only the first return result.