Editor's Note:
This tip is most useful for versions below ND6. In ND6, it will work, but @While and @For will perform iteration.
Most of time we have a field that has multiple values, and we want to use each value as a key to perform lookups. But @DBLookup does support multiple lookups in one shot. So we need to use LS for it. We can also do this in formula with the help of @Implode and @Explode.
Code
@Explode(@Implode
(@DbLookup( "Notes" : "NoCache" ; @dbname ;
"Viewname";MultivalueField ; "FieldToFetch");";");";")
MEMBER FEEDBACK TO THIS TIP
You may want to try using this:
@Explode(@Implode(@DbLookup( "Notes" :
"NoCache" ; @dbname ;"Viewname";MultivalueField ;
"FieldToFetch");";");";")
I've been told that the code above works unless one of the individual items generates an error -- then everything after that is blank. The Domino programmer I talked to said he has tried using this type of code, but ended up changing it to do a loop through each item in the Lotus Notes field so he could handle any error.
Again, this is hearsay as I haven't tried it myself!
Dave F.
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip library by member Smita Agarwal. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.