One of the benefits of XPages is the power of repeat controls to effectively perform 'joins', whether that is with nested repeat controls or merging data prior to displaying in a repeat control. When it comes to collections of documents I tend to favour NotesViewEntryCollections. This is both for performance (predominantly using getColumnValues().get) as well as sort order (NotesDocumentCollections are sorted on document creation order). Recently I had the need to extend an existing repeat control to use entries already available in another view. My approach was to use the NotesViewEntryCollection created using getAllEntriesByKey() and then add entries from the second ...
Agent profiling is not new in Domino, but it's something that gets little press. Because it's only available for agents, it's probably also going to become less useful as more and more development is done in XPages. But, working from the premise that the methods in use in LotusScript do the same work on the whole as their Java counterparts, best practices learned from LotusScript are equally applicable to XPages development. Over the last year there have been countless articles about the performance of NotesViewNavigator compared to NotesViewEntryCollections or NotesDocumentCollections. Innocently (or should that be naively), yesterday I wrote some code ...
GetDocumentByKey Fix Confusion
After a busy couple of days I've only just picked up the news that the GetDocumentByKey problem highlighted by Erik Brooks and discussed also by Ed Brill. The good news is that the fix is due to be released in 8.5.1 FP3, according to the SPR, and that the fix will cover client and server. That is scheduled for May 2010,so should be coming in the next week. But, as one of my colleagues pointed out, the SPR leaves a big question. The SPR says quite unequivocably "This regression was introduced in 8.5.1." However, for those who have followed the "the collection has ...
LotusScript: Export Contents of a View to .csv file
Yesterday I had a requirement to export a couple of views to csv files. We've done similar exports before, usually specific to the particular functions, so have used the traditional file handling functions that have been around for years - Open, Input (for reading), Write, Close. On this occasion, because I was exporting two views and to minimise the risk of columns being added to the export views but not included in the export agent, I wanted to build a more scalable solution. I knew that the NotesView class has a Columns property and from that I could get the column ...
Deletion Logging
I've learnt a lot over the years, but occasionally I'm reminded of reusable bits of code I created years ago and am still using today. Deletion logging is an example of that. Before I joined Intec I created a lotusscript library with a couple of function to track attempted deletions, either via a log or an email to an administrator. Time and again it's helped me out, whether to confirm user error or to prove a document must still be in the database somewhere. It's been very reliable and I'm still using it virtually unchanged, although I have considered convering ...
I came across a tweet yesterday evening about content assist for LotusScript in Domino Designer being slow. I committed the cardinal sin of assuming that the person in question already knew of the setting in the Preferences. Just in case the information, and more, is of use to anyone else - and because the Full Client Preferences are so voluminous it would take an aeon to investigate fully - here are a few settings/shortcuts. On the Domino Designer - LotusScript Editor tab there is a Code Assistance section. I find the hover help extremely useful, ...
It's funny how you rarely use some bits of script, and then within a week find you need them more than once. An example of this I've just had is the NotesViewNavigator class. The only previous occasion I used the class was for dashboard reporting some time ago, because I wanted the entries in the same order as the view and wanted to push totals to a function. One of the added benefits of this approach over NotesDocumentCollections was that I could get the full total regardless of the user's access to the actual documents, so long as they had access to at least one document ...
In the UK, from 1st January the standard TAX rate is returning to 17.5%. This was reduced to 15% on 1st December 2008 to help the economy. With only a week's notice, it also caused headaches for software developers and finance departments throughout the country. For SEAS, our electronic invoice approval system, the one week's notice of change to 15% did not give enough time for us to develop, QA and deliver an update to manage start and end dates in feeds of VAT Codes and processing according to the invoice date. Some customers use different VAT codes, so it was not ...
Now and then I come across a bit of functionality I never knew about. Occasionally I'm embarrassed to find out it's been there for ages! An example of that is the Run in background client thread option for Notes agents. I only noticed this because of the clearer layout for Agent properties in Domino 8.5 and, coincidentally, a customer had recently expressed frustration at a lengthy agent running and tying up the Notes Client. I enabled the property for the agent. When saving the agent it gives the following prompt, but still allows MessageBoxes to be generated to the user.






