Can someone please explain how to use multiple keywords in dblookup? I want to do something like @dblookup(“”:“NoCache”;“”;“Categories”;key;2; [FailSilent]+[ReturnDocumentuniqueID]) but I get an error message any time I try to use both keywords. Individually, they seem to work. TIA.
Subject: syntax for dblookup with concatenated keywords?
Prior to version 6, one would use a list of keywords:
@DbLookup(“”;“”;“Categories”;key1:key2:key3;2)
The problem with that approach is that the whole lookup fails on the first failure. If no results are found for key1, then an error is returned. If key2 fails, then you get key1’s results, but nothing for key3.
In ND6, create a loop to do the lookup separately for each of the keys.
returnList := “”;
keyList := key1:key2:key3;
@For(i:=0;i<=@Count(keyList);i:=i+1;
returnList := returnList:@DbLookup(“”;“”;“Categories”;key[i];2;[FailSilent]:[ReturnDocumentUniqueID]));
returnList := @Trim(returnList)
Subject: Try: @dblookup(“”:“NoCache”;“”;“Categories”;key;2; [FailSilent] : [ReturnDocumentuniqueID]) (Note the “:” as the sep for the parms)
Subject: RE: Try: @dblookup(“”:“NoCache”;“”;“Categories”;key;2; [FailSilent] : [ReturnDocumentuniqueID]) (Note the “:” as the sep for the parms)
Thank you so much! It was the colon. For all my years of doing this, I should have thought of that, but when the Help said “concatenate” I thought plus.