Subject: Verify data types and confirm @DbLookup functions properly
Hello. At first glance, I don’t see anything wrong with this formula. My first suggestion is for you to confirm that the data types of the abc field, znRouteTo and the @DbLookup return field Email are all the same. If abc is not multi value then the @DbLookup return field Email should not be either. Second, I would suggest that you put the @DbLookup in an @Prompt([OK]… in a button on the same form and click it to ensure the @DbLookup is functioning properly. If the @DbLookup is returning multi values then concatenate them before displaying them in the @Prompt.
ok - i’ll admit its been probably 5 yrs since i’ve looked at a dblookup command and i’m doing this from the top of my head - no easy way…lol
my guess is that because you’re utilizng a key of department to pull email that you are finding multiple entries in the view and it is returning them as an array…
first - lets test my theory @Prompt(@elements( … your dblookup code…))
that will tell you what it is finding. Now - if you are seeing it in an agent - just run the agent manually…
Ok - step 2: if i’m correct - then you can strip out our little test…then you can add the [unique] tag on the dblookup to get only the unique values (if i remember correctly) or you can do an @Trim(@unique(…))
Final step - fix the data and correct the code in the database allowing it to happen.
An additional possible cause would be data type but that would only be applicable if it is a sstrcutred data store as notes natively treats all fields as a variable data type (regardless of what they tell ya