Q
Problem solve Get help with specific problems with your technologies, process and projects.

In ND6, is it possible to create a view 'on the fly' using a document collection?

In ND6, is it possible to create a view "on the fly" using a document collection? We are trying to present a group of documents to a user using a view we present in the client (based on a previously created view), but not save the view on the server or in the local machine. Is this possible?
You can't do exactly that in 6, but I believe you can accomplish the same thing with some of our other new features in 6. With the new formula language looping feature (@While) and with the formula's new ability to reference array elements, combined with the ability to render pass-through HTML in the client, you can dynamically construct a pass-thru HTML table with the data from the collection. You would assemble the strings programmatically through formula language -- the formula language would be attached to computed text that has the pass-thru HTML attribute set.

For example, if your data was in three fields, each of which had multiple values and were valued from the collection, you could write some code like:

finalHtml := finalHTML + "tr.odd {background-color:CornflowerBlue}";
finalHtml := finalHTML + "tr.even {background-color:Lavender}";
finalHtml := finalHTML + "</style>";
finalHtml := finalHTML + "<TABLE>";
n := 1;
@While(n <= @Elements(vCol1);
@If(@Modulo(n;2) > 0;
finalHtml := finalHtml + "<tr class="odd"><td width="100" 
border="0">"  + vCol1[n] + "</td><td width="100" border="0
">" + vCol2[n] + "</td><td width = "300" border="0">" 
+ vCol3[n] + "</td>";
finalHtml := finalHtml + "<tr class="even"><td width="100" 
border="0">" + vCol1[n] + "</td><td width="100" border="0
">" + vCol2[n] + "</td><td width = "300" border="0">" 
+ vCol3[n] + "</td>");
n := n + 1);
finalHtml := finalHtml + "</TABLE>";
finalHtml
Thus you can create a dynamic table containing the data you want.

Dig Deeper on Lotus Notes 6

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

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