Show multiple Lotus Notes document fields in a single view column
You can use multiple Lotus Notes document fields in a single column to show data by using the @explode command with Formula language. In this tip, SearchDomino.com member OlliPekka Kamarainen provides a stepbystep example of how to implement this technique to set up a budget table in a Lotus Notes view.
You can use multiple Lotus Notes document fields in a single column to show data by using the @explode command with Formula language.
For example, let's say you have a budget table that you want to see in a Lotus Notes view. Just follow these steps:

Create a Lotus Notes form and add a number field where you'll be able to write your budget year.
 Then, create a table with two columns and 12 rows. The first column has 12 computed fields (representing the months January through December). The second column has 12 editable number fields for your monthly budgets.

Create a computed multivalue field that checks which rows will be shown in the Lotus Notes view.
Name your field "Rows" and use the following Formula language code:
@Trim( @If( @IsNumber(BudgetAmount_1) ;"01";""): @If( @IsNumber(BudgetAmount_2) ;"02";""): @If( @IsNumber(BudgetAmount_3) ;"03";""): @If( @IsNumber(BudgetAmount_4) ;"04";""): @If( @IsNumber(BudgetAmount_5) ;"05";""): @If( @IsNumber(BudgetAmount_6);"06";""): @If( @IsNumber(BudgetAmount_7);"07";""): @If( @IsNumber(BudgetAmount_8);"08";""): @If( @IsNumber(BudgetAmount_9) ;"09";""): @If( @IsNumber(BudgetAmount_10) ;"10";""): @If( @IsNumber(BudgetAmount_11) ;"11";""): @If( @IsNumber(BudgetAmount_12) ;"12";"") )

Create a hidden field for both columns  budget and month.
Note: Make sure that both text fields and multiple values are allowed. You should also create a field for "Years."
Here is the formula for "BudgetMonths":
@Trim( @If(@Contains(Rows;"01"); "01. January";""): @If(@Contains(Rows;"02");"02. February";""): @If(@Contains(Rows;"03");"03. March";""): @If(@Contains(Rows;"04");"04. April";""): @If(@Contains(Rows;"05");"05. May";""): @If(@Contains(Rows;"06");"06. June";""): @If(@Contains(Rows;"07");"07. July" ;""): @If(@Contains(Rows;"08");"08. August";""): @If(@Contains(Rows;"09");"09. September" ;""): @If(@Contains(Rows;"10");"10. October";""): @If(@Contains(Rows;"11");"11. November";""): @If(@Contains(Rows;"12");"12. December" ;"") )
Here is the formula for "BudgetAmounts":
@Trim( @If(@Contains(Rows;"01"); @Text(BudgetAmount_1);""): @If(@Contains(Rows;"02");@Text(BudgetAmount_2);""): @If(@Contains(Rows;"03");@Text(BudgetAmount_3);""): @If(@Contains(Rows;"04");@Text(BudgetAmount_4);""): @If(@Contains(Rows;"05");@Text(BudgetAmount_5);""): @If(@Contains(Rows;"06");@Text(BudgetAmount_6);""): @If(@Contains(Rows;"07");@Text(BudgetAmount_7) ;""): @If(@Contains(Rows;"08");@Text(BudgetAmount_8);""): @If(@Contains(Rows;"09");@Text(BudgetAmount_9) ;""): @If(@Contains(Rows;"10");@Text(BudgetAmount_10);""): @If(@Contains(Rows;"11");@Text(BudgetAmount_11);""): @If(@Contains(Rows;"12");@Text(BudgetAmount_12) ;"") )
Here is the formula for "Years":
y:=@Text(Year); @Trim( @If(@Contains(Rows;"01");y;""): @If(@Contains(Rows;"02");y;""): @If(@Contains(Rows;"03");y;""): @If(@Contains(Rows;"04");y;""): @If(@Contains(Rows;"05");y;""): @If(@Contains(Rows;"06");y;""): @If(@Contains(Rows;"07");y ;""): @If(@Contains(Rows;"08");y;""): @If(@Contains(Rows;"09");y ;""): @If(@Contains(Rows;"10");y;""): @If(@Contains(Rows;"11");y;""): @If(@Contains(Rows;"12");y ;"") )

Create a Lotus Notes view with three columns. The first column shows the year.
Check off "Show multiple values as separate entry" and use the following formula for the column:
@TextToNumber(@Explode(Years;""))
The second column shows the month.
Check off "Show multiple values as separate entry" and use following formula for the column:
@Explode(BudgetMonth;"")
The second column shows the budget.
Check off "Show multiple values as separate entry" and use the following formula for the column:
@TextToNumber(@Explode(BudgetAmounts;""))
 Now, fill in the budget form.
Note: You can use the totals, averages, etc. properties like you would normally.
This tip explains that it is for a Lotus Notes view, but a Lotus Notes view can only show nine rows from a single record in a column. This would work well on a Webenabled system, which does not have the ninerow limitation.
Gregg B.
Thanks for posting a comment Gregg. This trick actually does work in the Lotus Notes client side. I've tested and used this trick in a Lotus Notes Domino production environment for six months. Even now, there is one Lotus Notes document that has 24 rows, all of which are correct.
OlliPekka Kamarainen, tip author
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip library by member OlliPekka Kamarainen. 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.
Please create a username to comment.