STRUGGLING WITH EXPORTING NOTES DATA TO SPREADSHEETS? NO MORE! Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino
Don't spend unproductive time maintaining different versions of the same spreadsheet
Preserve data integrity and security in multi-user environments
Create reports in minutes INSIDE Notes
Get freedom from iterative report requests, deliver self-serve capabilities
Experience Reporting, Dashboards, and Analysis INSIDE Notes!
I have a bit of code in a WebQueryOpen agent, which loops a field called "Members", which stores a list of Notes-style user names and prints to the browser their name in a formatted style. The code is very simply:
Set item = web.document.GetFirstItem("dspMembers")Forall v In web.document.GetFirstItem("Members").valuesCall item.AppendToTextList( "<li>"+GetUserDetails( Cstr(v), "Formal" ) +"</li>")End Forall
No prizes for working out what those does. For each member listed in the document it adds a bullet point to the displayed list of members. How the name of the user is displayed is governed by a separate function.
This GetUserDetails() function is a bit like an extended @NameLookup for LotusScript. I keep it in my "CommonRoutines" Script Library and it's accessible from all my agents. It looks like this:
Function GetUserDetails(username As String, detail As String) As StringDim uname As NotesNameDim userDoc As NotesDocumentDim userView as NotesViewSet uname = New NotesName(username)If web.directory.IsOpen Then 'web.directory is "names.nsf"Set userView = web.directory.getView("($VIMPeople)")If Not userView Is Nothing ThenSet userdoc = userView.GetDocumentByKey(uname.Abbreviated, True)If Not userdoc Is Nothing ThenIf detail = "Long" Then GetUserDetails = userdoc.Salutation(0) _ + " " + Left(userdoc.FirstName(0), 1) + " " + userdoc.Lastname(0) _ +", " + userdoc.CompanyName(0) + "<br />"+userdoc.OfficePhoneNumber(0) _ +"<br /><a href=""mailto:"+userdoc.MailAddress(0)+""">"+userdoc.MailAddress(0)+"</a>"Elseif Lcase(detail) = "formal" Then GetUserDetails = userdoc.Salutation(0) + " " + Left(userdoc.FirstName(0), 1) + " " + userdoc.Lastname(0)Elseif Lcase(detail) = "fullname" Then GetUserDetails = userdoc.Salutation(0) + " " + userdoc.FirstName(0) + " " + userdoc.Lastname(0)Else 'Unknown format. Must want field value?If userdoc.HasItem(detail) Then GetUserDetails = userdoc.GetItemValue(detail)(0)Else GetUserDetails = uname.AbbreviatedEnd IfEnd IfElse GetUserDetails = uname.AbbreviatedEnd IfElse GetUserDetails = uname.AbbreviatedEnd IfElse GetUserDetails = uname.AbbreviatedEnd IfEnd Function
The idea is that, given a name like Jake Howlett/ROCKALL it uses the address book to return a name in the form Mr J Howlett, Rockall Design ltd, Nottingham. Or you can just use it to get a field's value by name. If for any reason it can't find the user document or work out what to return it just returns the user name in abbreviated form.
It all works well, but, after not very long I noticed the WQO agent which used it was taking longer and longer to run. The slowness of the WQO was directly proportional to the number of Members. Most of you can probably see why. If not, then the title of this page should give you a clue.
The problem with my code is, of course, that I'm repeatedly calling the getView() method. Consider this from Julian's list of preformance tips:
If you need to use a reference to a view multiple times in your code, get the view only once and share the reference (either using a global or static variable, or by passing a NotesView object as a parameter in functions/subs/methods). Accessing views using getView is a very expensive operation
It turned out that each call to web.directory.getView("($VIMPeople)") was taking 0.3s. For 100 members that means it takes way, way too long to open. Remember no web page should take longer than 7s to open!
So, taking Julian's advice I turned the user view in the directory in to a global variable as part of the WebSession class. Agents that were taking 20 seconds or more to load are now taking less than one!
I had no idea this was such bad practice. More than ten years with Notes and I'm still learning the basics...
When a server that is a member of a cluster performs consistency checks on a database, or compacts a database, it should automatically mark the database as Out of Service in the Cluster Database Directory for the duration of the operation.
(In the case of compact, it will only happen during copy-style compacts.)
This will allow users opening the database to fail over to another cluster member. It also means that compact won't be terminated by users opening the database halfway through the operation.
Ideally this behaviour would be automatic, but could be overridden with a command line option on fixup/compact if needed.
If a database is already marked as Out of Service, then fixup/compact should not mark it as available at the end of the operation.
It may also be a good idea to control this behaviour with an INI variable - MarkOutOfServiceDuringMaintenance={On|Off} - in case an Administrator wants to override this behaviour.
We'd like to provide reusable XPage controls to build apps for smartphones. As a starting point we've done a very simple mobile app for OpenNTF: http://m.openntf.org Here is a quick demo on an Android phone: Since it's hard to really see ...
Welcome to the IBM® Redbooks® wiki on using Best Practices for Domino 8.5 Web Application Development. IBM Lotus® and IBM Redbooks publications have partnered together to create this wiki content that explains best practices and approaches for developing Web applications using Domino 8.5.1.
For your Lotus Notes 8.0.1 client, you have enabled the Client Single Logon function. After you change your password in the Notes client, you are not prompted to change the operating system password. Therefore, the two passwords are no longer synchronized
This posting captures known omissions and inaccuracies in the Alloy documentation available at http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp.