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

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close