Manage Learn to apply best practices and optimize your operations.

Looping through @Implode and @Explode

Learn how to perform multiple lookups in one shot.

Editor's Note:
VIEW MEMBER FEEDACK TO THIS TIP
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.

@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.

Dig Deeper on Lotus Notes Domino Formula Language

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close