<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
<channel>
<title>CodeStore.net comments on "One Week Solutions"</title>
<description>Replies to blog "One Week Solutions" on codestore.net.</description>
<link>http://www.codestore.net/</link>
<lastBuildDate>Tue, 2 May 2006 08:06:00 +0100</lastBuildDate>
<atom:link href="http://www.codestore.net/store.nsf/blog.xml?Open=20060201" rel="self" type="application/rss+xml" />

<item>
	<title>Reply from Dwight Wilbanks</title>
	<pubDate>Tue, 2 May 2006 08:06:00 +0100</pubDate>
	<author>Dwight Wilbanks</author>
	<description><![CDATA[ 
		<p>Heres mine.</p>
		<p>Column 1, sorted Categorized</p>
		<p>DT := @Date(EventDate);</p>
		<p>DT:</p>
		<p>@Adjust(DT;0;0;1;0;0;0):</p>
		<p>@Adjust(DT;0;0;2;0;0;0):</p>
		<p>@Adjust(DT;0;0;3;0;0;0):</p>
		<p>@Adjust(DT;0;0;4;0;0;0):</p>
		<p>@Adjust(DT;0;0;5;0;0;0):</p>
		<p>@Adjust(DT;0;0;6;0;0;0);</p>
		<p>Column 2, Sorted</p>
		<p>@Date(EventDate)</p>
		<p>Then just @dblookup on todays date.</p>
		<p>The big test for performance is the frequency of documents changing VS the data read frequency.</p>
		<p>An expensive view action can make sense when the data is not changing often and retrieved value is used often.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=18261BC2B9F1DA158625710C004D8856"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_18261BC2</link>
</item><item>
	<title>Reply from Rod Stauffer</title>
	<pubDate>Thu, 2 Mar 2006 01:47:00 +0100</pubDate>
	<author>Rod Stauffer</author>
	<description><![CDATA[ 
		<p>Just throwing another idea into the pool...</p>
		<p>First off, is this an intranet app?  If so, a browser standard should allow you to do XML client side (in theory).  If so, this could be relatively simple...</p>
		<p>What I'm getting at is -?ReadViewEntries- and the optional URL arguments that were added for the iNotes team (without these, don't ask me how they'd have accomplished the Calendar portion of iNotes).  OK, by now it's Domino Web Access instead of iNotes...I'll catch up.  :-)</p>
		<p>The ones in question are:</p>
		<p>- KeyType</p>
		<p>- StartKey</p>
		<p>- UntilKey</p>
		<p>With KeyType, you can tell Domino to treat the StartKey and UntilKey as dates (check "URL Commands" in Designer Help, or the link above for "website").  Here's a snippet:</p>
		<p>-----</p>
		<p>If &KeyType=time is specified, then &StartKey and &UntilKey may be ISO date time values. For example, you might use the time value 20020101T140000,00Z to represent 9:00AM Eastern standard Time in Coordinated Universal Time (UTC) or Greenwich Mean Time (GMT), or you might use the time value 20020101T090000,00-05 to represent the same date and time in local time plus offset.</p>
		<p>-----</p>
		<p>Using those, and client side XML transforms, all you'd need is a view sorted by EventDate.  Avoid the daily agent, avoid numerous folders, and avoid @Today selection formulas.  Then again, I'm probably missing something.  :-)</p>
		<p>Of course key factor is whether or not requirements allow you to code for only AJAX capable browsers... </p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=D8A4A6D5E867B22C8625710A002ACDBE"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_D8A4A6D5</link>
</item><item>
	<title>Reply from Ed Lee</title>
	<pubDate>Thu, 2 Feb 2006 05:27:00 +0100</pubDate>
	<author>Ed Lee</author>
	<description><![CDATA[ 
		<p>Hi Jake,</p>
		<p>Create a Program document that runs Updall -- use this method to schedule Updall to run at particular times.</p>
		<p>e.g.</p>
		<p>load updall database.nsf -T "viewname"</p>
		<p>Then schedule it for whenever you want</p>
		<p>Hope this helps</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=9E0F3026E047073086257109003EFCE6"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_9E0F3026</link>
</item><item>
	<title>Reply from Jake</title>
	<pubDate>Thu, 2 Feb 2006 04:31:00 +0100</pubDate>
	<author>Jake</author>
	<description><![CDATA[ 
		<p>Keiser. I wish I could have used LAMP, but the customer *wanted* a Domino solution.</p>
		<p>Ed. I'm confused now. I'm going to have to play with this one and see if it can eliminate the need for nightly agents.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=A36E6E8BFCF22989862571090039C54D"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_A36E6E8B</link>
</item><item>
	<title>Reply from Ed Lee</title>
	<pubDate>Thu, 2 Feb 2006 04:12:00 +0100</pubDate>
	<author>Ed Lee</author>
	<description><![CDATA[ 
		<p>Jake,</p>
		<p>Could not just use @TextToTime("Today") in your view selection and then create program document to do an updall on that specific view?</p>
		<p>It's a simple solution that is easy to maintain/</p>
		<p>Ed</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=B25B915324EFA7DE862571090038174F"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_B25B9153</link>
</item><item>
	<title>Reply from Keiser</title>
	<pubDate>Thu, 2 Feb 2006 03:22:00 +0100</pubDate>
	<author>Keiser</author>
	<description><![CDATA[ 
		<p>Yeah, Jerry is right. You could even do it in PHP !</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=8B3F7468AB3C922D8625710900337CC1"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_8B3F7468</link>
</item><item>
	<title>Reply from Glen</title>
	<pubDate>Mon, 2 Jan 2006 15:18:00 +0100</pubDate>
	<author>Glen</author>
	<description><![CDATA[ 
		<p>This document from Lotus Support discusses the various options: "Time/Date Views in Notes: What Are the Options?" (click on "website" above to see it)</p>
		<p>I have used @Today in views (albeit in the Notes client) without any unacceptable performance hit or delay to the user. Other options are listed in the document.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=4F388EEE22BC40FC86257108007511B2"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_4F388EEE</link>
</item><item>
	<title>Reply from Tom</title>
	<pubDate>Mon, 2 Jan 2006 14:59:00 +0100</pubDate>
	<author>Tom</author>
	<description><![CDATA[ 
		<p>Instead of @today try this out @TextToTime(Today)</p>
		<p>found this somewhere on the net but haven't used it yet. The example was </p>
		<p>SELECT ((@TextToTime(Today) - CREATIONDATE)/86400)</p>
		<p>cheers Tom</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=B2246FBB52F2DE1D862571080073595A"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_B2246FBB</link>
</item><item>
	<title>Reply from Jerry Carter</title>
	<pubDate>Mon, 2 Jan 2006 10:07:00 +0100</pubDate>
	<author>Jerry Carter</author>
	<description><![CDATA[ 
		<p>Jake,</p>
		<p>I know I'm coming late to the party... but if the right solution (and by right I mean, works best with least code) is a SQL Query, has there been any discussion with the client about backing their domino websites with something more robust for data?  I know that means a lot more work than any solution identified, but where there is one clear need for this kind of data flexibility, there may be more.  Perhaps their Admin or System Architect would be receptive to expanding the capabilities and you'd have yourself some work updating their templates. :-)</p>
		<p>A tangent, but I try to consider all the possibilities when I start running into too many difficulites with a particular approach.  While more involved, it seems cleaner.</p>
		<p>Best of luck in any case!</p>
		<p>Jerry</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=12E1F77F52B74416862571080058911E"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_12E1F77F</link>
</item><item>
	<title>Reply from EdwinL</title>
	<pubDate>Mon, 2 Jan 2006 08:21:00 +0100</pubDate>
	<author>EdwinL</author>
	<description><![CDATA[ 
		<p>Hi Jake, </p>
		<p>i seem to remember that any functionality you placed under the views "Form Formula" and the "Helprequest" would be cleared after altering the view via LScript version 6.x . </p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=C889C61831B4309686257108004EDCFC"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_C889C618</link>
</item><item>
	<title>Reply from PaulG</title>
	<pubDate>Mon, 2 Jan 2006 07:57:00 +0100</pubDate>
	<author>PaulG</author>
	<description><![CDATA[ 
		<p>Someone shoot me down - but what's wrong with @transform?</p>
		<p>Build the view - categorised by date. Then on the form doing the lookup, set your 7 dates in a list and use @transform like so:</p>
		<p>@transform(date_list; "X"; @Dblookup("";"";"eventsview"; X; 2))</p>
		<p>The results are already sorted because you make sure the date list is sorted to begin with.</p>
		<p>Is this crazy talk?</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=C278B58CA241F88986257108004CA775"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_C278B58C</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 07:39:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>Jake. I think with the @TextToTime method the view needs to be updated each day to make it work - i.e to pick up the correct date again.  So I suppose a nightly agent that just refreshes the view would do this?   My test worked because the view has a selection of creation date &gt;= @textToTime("Today"). I guess this view will be incorrect tomorrow unless the index is refreshed (i.e it will still have todays date in)</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=17C5D9602D52DBD086257108004B11FE"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_17C5D960</link>
</item><item>
	<title>Reply from Richard Schwartz</title>
	<pubDate>Mon, 2 Jan 2006 07:12:00 +0100</pubDate>
	<author>Richard Schwartz</author>
	<description><![CDATA[ 
		<p>Changing selection formulae programmatically is a good solution if there is just one view (or a small number of views) and if the database is not that big.  In the case of my bloggregator database, neither one of those is true.  I have three date ranges that I display: one day, two days, and seven days; and I generate those displays for all RSS feeds that I pull in, or for any one RSS feed -- and I have upwards of 200 feeds coming in and a total of more than 120,000 documents in the database at present time.  </p>
		<p>I could have gone with three "all" views plus three views per feed, but the massive number of view rebuilds that would occur every night when the selection formulae are updated would scare me even if the database were a lot smaller, so there was no way I was going to go this way.</p>
		<p>In theory, I could use just six views -- three uncategorized, and three categorized by feed, and adjust the selection formulae nightly.  Chaanging the selection formulae would result in complete rebuilds of all six views every night, but with only six views this may not be too bad.  There are two reasons why I didn't do this, though.</p>
		<p>The first reason I didn't do it is that -- hust as is the case with readernames fields -- single category view displays can get quite slow when there are thousands of documents that have to be skipped in order to locate the ones that are actually displayed, so I decided not to go that way.  In my own use, the number of documents that would be selected in the seven day categorized view is only around 5000 at any given time, and that's below the threshold where performance issues tend to set in, so I could probably have used the views and show single category, but my goal was to build a behind-the-firewall re-aggregator that could scale to thousands of feeds, with potentially tens of thousands of current in a seven day span.</p>
		<p>The second reason that I didn't do it is that you can't control the order of view rebuilds.  There's no guarantee that the order in which you update the selection formulae is the order in which the rebuilds will occur.  Although the worst thing I can think of happening in my application if views were updated in an unusual order is that there could be a significant time lag during which many documents appear in the 1 Day\All view but aren't in the 1 Day views for their particular feed (or vice versa), it still seemed to me that making a major design feature dependent on the order of view rebuilds was a bad idea.</p>
		<p>So, I went with the folder approach.  Or, I guess I should say the massively mulitplied folder approach ;-)  I set up folders for All\1 Day, All\2 Days, and All\7 Days, and the code also sets up a 1 day, 2 day and 7 day folder for each individual feed that are added.   As they are created, new documents get put in the 1, 2 and 7 day folders for their particular feed, and also in the 1, 2, and 7 day "all" folder.  A nightly agent traverses the All\7 Days folder and removes documents as needed -- from that folder and also from the others as needed.  The performance has been consistently good, the massive number of folders required has (so far) not been a problem, and while the agent takes quite a while to run the performance impact on the server while it is running is barely noticeable.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=A685C2C4DCDC7B77862571080048881B"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_A685C2C4</link>
</item><item>
	<title>Reply from Jake</title>
	<pubDate>Mon, 2 Jan 2006 06:51:00 +0100</pubDate>
	<author>Jake</author>
	<description><![CDATA[ 
		<p>Dragon. Yeah, it's still a hack, but it's the lesser of two evils. As I love to continually remind you all - I find developing decent websites with Domino is one big hack. C'est la vie.</p>
		<p>I'd prefer to consider using the @TextToTime("Today") solution. Does anybody know if this is correct. Not that I don't trust SearchDomino.com or anything, but I'd like to see some concrete proof this is any better than using @Today. Seems like the same thing to me, in terms of the view index.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=AB795561DA557A5C8625710800469F31"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_AB795561</link>
</item><item>
	<title>Reply from Richard C</title>
	<pubDate>Mon, 2 Jan 2006 05:47:00 +0100</pubDate>
	<author>Richard C</author>
	<description><![CDATA[ 
		<p>Another way of doing things ...</p>
		<p>1) Upon saving an Event, use a wqs agent to set the isNextWeeksEvent field to be 0 or 1.</p>
		<p>2) Have the MeetingsNextWeek view's selection criteria of being isNextWeeksEvent = 1</p>
		<p>3) Run a scheduled (daily) agent to reset the isNextWeeksEvent field value if it needs to be changed.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=208B6B9B0DCF351E862571080040C0F2"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_208B6B9B</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 05:14:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>@Dragon.  I'm not so sure that a manual view refresh is required on the @TextToTime view - maybe it used to be but not in R6?  I just create a view and then created a new document.  When I saved the doc it appeared automatically in the view - no manual refresh was required.  Or am I missing something?</p>
		<p>I agree about the overnight agent updating the selection formula - I really think the template problem is a nasty one.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=B789C62B3D612D8B86257108003DC7FD"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_B789C62B</link>
</item><item>
	<title>Reply from Dragon Cotterill</title>
	<pubDate>Mon, 2 Jan 2006 05:07:00 +0100</pubDate>
	<author>Dragon Cotterill</author>
	<description><![CDATA[ 
		<p>@Richard, @TextToTime works. But it does require a view refresh to update it properly.</p>
		<p>Jake yesterday mentioned that he stopped when he considered something a hack. Well running an overnight agent to update a view is something that I would consider a hack.</p>
		<p>Why should the design have to be modified everytime? Surely this is quite a major hack.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=64966FE8ADDCBAA286257108003D2725"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_64966FE8</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 04:48:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>See {<a href="http://searchdomino.techtarget.com/tip/1,289483,sid4_gci1052695,00.html?FromTaxonomy=%2Fpr%2F283836">Link</a>}</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=4AECD8D8913B120286257108003B67AC"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_4AECD8D8</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 04:47:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>Would a better solution be to use @TextToTime("Today") in the view selection formula rather than @Today. I seem to remember that being a tip for these sorts of views?  If that performs eficiently then there's no need for the update agent at all?</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=AED85849EC4F256386257108003B4058"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_AED85849</link>
</item><item>
	<title>Reply from YoGi</title>
	<pubDate>Mon, 2 Jan 2006 04:35:00 +0100</pubDate>
	<author>YoGi</author>
	<description><![CDATA[ 
		<p>As I said in the previous blog, HTML code cached in a single document, regenerated on a daily basis OR on an user action, seems to me much better. </p>
		<p>Just a @dblookup to grab the code, no administration problem.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=9B9921D25268C95386257108003A37D8"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_9B9921D2</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 03:44:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>Or alternatively set the view to "not update from design template" I suppose (something I hate doing).</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=7A9E693FD6053C828625710800358738"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_7A9E693F</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 03:43:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>Jake, of course the other worry is if your Client's admin procedures are to update their database designs from templates every night (e.g at 4.00 AM or whatever) you need to tell tham that either a) the nightly agent is actually scheduled to run in the template itself or b) it needs to run evey night AFTER their design update process runs.  Bit of a nightmare really???</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=4B2F018592DDDDB68625710800356766"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_4B2F0185</link>
</item><item>
	<title>Reply from Richard Shergold</title>
	<pubDate>Mon, 2 Jan 2006 03:31:00 +0100</pubDate>
	<author>Richard Shergold</author>
	<description><![CDATA[ 
		<p>There is also the problem that if for any reason that nightly agent does not run then the app falls apart functionally.  </p>
		<p>But that's something you have to live with too I guess.  </p>
		<p>I'm not too sure about it either - I love the fact that you can update view formulas like this but these two factors (the template one especially) are a bit of a worry.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=F51D4871A17591D88625710800345A91"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_F51D4871</link>
</item><item>
	<title>Reply from Nick Wall</title>
	<pubDate>Mon, 2 Jan 2006 03:29:00 +0100</pubDate>
	<author>Nick Wall</author>
	<description><![CDATA[ 
		<p>You already have your solution, but with regard to "sorting" a NotesDocumentCollection after a db.search()...I have used the following, it could </p>
		<p>be adapted for dates, numbers, etc.</p>
		<p>(I think I got this from LD6 forum, so thanks to whoever originally wrote it):</p>
		<p>Public Function SortDocumentCollection( dcol As NotesDocumentCollection, fieldName As String) As Variant</p>
		<p>'Sort documents in a collection in alphabetic order by the field specified</p>
		<p>'STM 2001-10-05</p>
		<p>Dim session As New NotesSession</p>
		<p>Dim db As NotesDatabase</p>
		<p>Set db = session.CurrentDatabase</p>
		<p>Dim array As Variant</p>
		<p>Dim k As Integer</p>
		<p>k = dcol.count</p>
		<p>If k &lt;&gt; 0 Then</p>
		<p>Redim array( 1 To k )</p>
		<p>array = docCollectionToArray( dcol )</p>
		<p>'  //  Need to add a value at the end that will always be greater than all - language dependent</p>
		<p>Redim Preserve array( 1 To k+1 )</p>
		<p>Set array( k+1) = db.CreateDocument</p>
		<p>Call array( k+1).ReplaceItemValue( fieldName, "ÅÅÅÅÅÅÅ" )</p>
		<p>array = QuickSort( array, fieldName, Lbound(array), Ubound(array) - 1 )</p>
		<p>Redim Preserve array( 1 To k )</p>
		<p>SortDocumentCollection = array</p>
		<p>Else</p>
		<p>SortDocumentCollection = ""</p>
		<p>End If</p>
		<p>End Function</p>
		<p>Private Function QuickSort (array As Variant, fieldName As String, leftpos As Integer, rightpos As Integer) As Variant</p>
		<p>'Sub function in SortDocumentCollection</p>
		<p>'STM 2001-10-05</p>
		<p>Dim i As Integer</p>
		<p>Dim j As Integer</p>
		<p>Dim pivot As String</p>
		<p>If ( leftpos &lt; rightpos ) Then</p>
		<p>i = leftpos</p>
		<p>j = rightpos + 1</p>
		<p>pivot = Ucase( array(leftpos).GetFirstItem(fieldName).Text )</p>
		<p>Do</p>
		<p>Do</p>
		<p>i = i + 1</p>
		<p>Loop While Ucase( array(i).GetFirstItem(fieldName).Text ) &lt; pivot And i &lt;= rightpos</p>
		<p>Do</p>
		<p>j = j - 1</p>
		<p>Loop While Ucase( array(j).GetFirstItem(fieldName).Text ) &gt; pivot And j &gt;= leftpos</p>
		<p>If ( i &lt; j ) Then</p>
		<p>array = SwapInArray( array, i, j )</p>
		<p>End If</p>
		<p>Loop While ( i &lt; j )</p>
		<p>array = SwapInArray( array, leftpos, j )</p>
		<p>Call QuickSort( array, fieldName, leftpos, j - 1 )</p>
		<p>Call QuickSort( array, fieldName, j + 1, rightpos )</p>
		<p>End If</p>
		<p>QuickSort = array</p>
		<p>End Function</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=7150B239326767C78625710800342022"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_7150B239</link>
</item><item>
	<title>Reply from Jake</title>
	<pubDate>Mon, 2 Jan 2006 03:23:00 +0100</pubDate>
	<author>Jake</author>
	<description><![CDATA[ 
		<p>The template issue is an, errr, issue. Not sure how I feel about it really. It will be a pain to document and inform the client's admin of, but wodyado? It's life with Notes I guess.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=5B424AF7C1A66E528625710800339F93"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20060201?OpenDocument#DOC_5B424AF7</link>
</item>

</channel>
</rss> 
