Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Joining Lists Problem

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#ArrayJoin or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/ArrayJoin


When joining lists together with + the longest list will define the number of elements in the list. This is a feature of @formula pairwise operators. This can be powerful but can also be tricky to debug.





To demonstrate this put this code in a button:

list1:="a":"b":"c":"d";
list2:="1":"2";
list3:= "x":"y":"z";

@prompt([okcanceledit];"title";"result";@implode(list1+list2+list3);"")

 

The result is :

a1x b2y c2z d2z

The last elements of the three lists are used to pad out the list results.

The 2 are guessed at.

The z is guessed at.

 

Look at permuted operators for even more interesting results:

Replace the prompt line with

@prompt([okcanceledit];"title"; "result"; @implode(list1*+list2*+list3);"")

in your button code.

the result is:

a1x a1y a1z a2x a2y a2z b1x b1y b1z b2x b2y b2z c1x c1y c1z c2x c2y c2z d1x d1y d1z d2x d2y d2z

Must be useful, sometimes difficult to think when to use it though.

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
man and boy by Tony Parsons
British book of the year 2000. Great book, hard to put down, but I nearly threw it away half way through. You'll know why when you read it.
See at: Amazon.co.uk | Amazon.com |