User experience guidelines for IBM Lotus rich client applications and plug-ins

This white paper describes user-interface design and interaction guidelines for designers and developers who are building IBM® Lotus® Notes® applications, IBM Lotus Sametime® V7.5 or later plug-ins, IBM Lotus Symphony� plug-ins, IBM Lotus Expeditor plug-ins, or composite applications (assembling any mixture of plug-ins, Lotus Notes applications, and components built with IBM Lotus Component Designer).

[via Mary Beth Raven]


ddCharts – Now Displays Charts In Notes Client

Richard Hogan of 6wSystems released ddCharts v5.0 – Beta 1(b) which displays the charts also in a Notes client, and as, it doesn’t need to access the server using http, it solves the double login issue. Performance with very large views has also been improved.
If you are looking for a solution to display your data as a pie-, line- or bar-chart ( or as gauge as well ) then download your free evaluation copy of ddCharts now.

ddcharts

There will be another download available on the 6wSystems website in a few days which let you create charts from !!HELP!!.
!!HELP!! is an open source trouble ticket solution for Lotus Notes / Domino. Visit OpenNTF.org to get your copy of !!HELP!!.


OpenProj – A Microsoft Project Replacement

OpenProj is a free, open source project management solution. OpenProj is a complete replacement of Microsoft Project and other commercial project solutions.

OpenProj

The OpenProj solution is the most advanced project solution ever provided to the open source community. Projity has open sourced the entire OpenProj solution including the most advanced scheduling, resource and cost algorithms in the industry. Projity provides the source code and OpenProj solution free of charge. OpenProj runs on Linux, Unix, Mac or Windows desktops.


Display Date Range As Bar In Notes Views

You can find a lot of stuff on the internet like Chris Blatnick’s ” Using Color Columns To Make A Gantt Chart” to display column values either as color or as picture ( you might take a look at “A Splash of Color” as well ).
Today I would like to share my solution on how to build a view to display a date range like it is used in group calendar applications.

Display Calendar Entries

I tried to keep the view design as simple as possible to avoid performance impacts. As you can see in the sample database there are no formulas in the columns. All necessary information is stored in a “collector” document.

Form Design

The form contains one field for each day in a month ( Day_1 … Day_31 ). All fields are of type text with multiple values enabled. To colorize Day_1 ( and all subsequent colums ) simply put 0 : 255 : 255 into Day_1 which results in an aquamarine color.
Surfing the web for more information about view column colors I found this article on breakingpar.com.
Instead of using 6 decimal numbers for foreground and background color, you can use hexadecimal values as well. This would make it easier to handle the data when passing it via LotusScript to the collector document.

We can now build a list of colorcodes.

' Declaration

Dim ColorCode List As String

Sub Initialize
	ColorCode("Alice_Blue") = "F0F8FF"
	ColorCode("Antique_White") = "FAEBD7"
	ColorCode("Aqua") = "00FFFF"
	ColorCode("Aquamarine") = "7FFFD4"
	ColorCode("Azure") = "F0FFFF"
	ColorCode("Beige") = "F5F5DC"
	ColorCode("Bisque") = "FFE4C4"
	ColorCode("Black") = "000000"
	ColorCode("Blanched_Almond") = "FFEBCD"
	ColorCode("Blue") = "0000FF"
	ColorCode("Blue_Violet") = "8A2BE2"

...
End Sub

You can call the following function and pass a colorcode from the list as a parameter. You can use any hexadecimal value that is not in the list as well.

Function SetMarker ( doc As NotesDocument, user As String,_
DateFrom As NotesDateTime, DateTo As NotesDateTime, color As String ) As Integer

	On Error Goto ERR_HANDLE
	SetMarker = 0
	Dim item As NotesItem
	Dim i As Integer
	Dim MarkerBegin As Integer
	Dim MarkerEnd As Integer
	Dim MarkerColor (1) As String

	If Iselement(ColorCode( color)) Then
		MarkerColor(0) = ColorCode( color)
		MarkerColor(1) = ColorCode( color)
	Else
		MarkerColor(0) = color
		MarkerColor(1) = color
	End If

	MarkerBegin = Day ( DateFrom.DateOnly )
	MarkerEnd = Int ( Day ( DateTo.DateOnly )) + 1

	Set Item = doc.ReplaceItemValue ( DAY_FLD_PREFIX + Cstr( MarkerBegin ), MarkerColor)
	If MarkerEnd - MarkerBegin > 1 Then
		For i = (MarkerBegin +1) To (MarkerEnd -1)
			Set Item = doc.ReplaceItemValue ( DAY_FLD_PREFIX + Cstr ( i ), "" )
		Next
	End If
	If Not ( MarkerEnd > 31 ) Then
		Set Item = doc.ReplaceItemValue ( DAY_FLD_PREFIX + Cstr ( MarkerEnd ), "FFFFFFF" )
	End If
	Call doc.Save ( False, False )

EXITPOINT:
	Exit Function
ERR_HANDLE:
	SetMarker=1
End Function

The function writes the necessary values to the document. It translates the DateFrom and DateTo parameters and writes the according colorcodes. As you can see in the next screenshot, only two fields are needed to build a bar for a date range.

Values

Notes colorizes the column displaying the colorcode from the document and subsequent columns as long as you do not set the column to another color. Any hexadecimal value longer than 6 will reset the column color to default.

DOWNLOAD Sample Database


Notes 7.0.3 – Problem With German Umlauts

I’ve recently downloaded “IBM Lotus Notes Client 7.0.3 for Windows 2000, XP and Vista German (C180SDE)” from passport advantage. After upgrading my 7.0.2 de client to the 7.0.3 the views in the IBM standard templates do no longer display multi value entries as expexted.

The problem is reproducable. With a little help from the Lotus Notes Community, it was found that this issue only occurs when you use Umlauts in your view columns.
It seems to be a regression bug described here.

To solve this issue, you can replace your umlauts with the corresponding ue, ae etc. or simply add

DisableUniscribe=1

to the client’s notes.ini.

P.S. There already exists an SPR ( # JKEY79CGTE ). I hope it will be fixed in 7.0.4.


Instance member…does not exist’ when enabling Out Of Office

Today I had a lot of calls in our helpdesk regarding Out Of Office. Users complained that the had enabled the agent before Christmas and it worked fine but when they tried to disable the agent it does not disable. Instead the Out Of Office profile shows the following message:

Even it is in German, I think I do not have to translate the blue text as you might know that this is the message that is displayed when a user has editor access to his mail file and tries to enable / disable the Out Of Office agent.
With editor access an administration request is created that will enable / disable the agent on behalf of the user.

Well, nothing special so far. Except the fact that this message is displayed to the user all day long and I could not find any administration request on the server.

I tried to reproduce the error on my workstation but failed. I opened the users desktop remotely and there it was. An error message occurred in the statusbar stating that there is a

Notes error: 182 Instance member CONFIGUREMAILAGENTTEXT does not exist.

I searched the Knowledge Base for CONFIGUREMAILAGENTTEXT and found this technote

In Lotus Notes®, you attempt to enable the Out Of Office (OOO) agent in your mail file. The agent does not enable and you notice the following error message in the status bar of the Notes client:

“Notes error: 182 Instance member CONFIGUREMAILAGENTTEXT does not exist.”

This issue only occurs for users with Editor access to their mail file and only occurs in Notes, regardless of the mail template design being used. The issue does not occur when using Lotus Domino® Web Access (DWA) mail.

So, what has happened?

On December, 29th, 2007 I did a mass change on the users mail files to ensure that all ACL only have editor access with all options set except ‘Can Create personal agents’.

We use Domino server version 7.0.3 and Notes Client version 7.0.2 with a slightly modified dwa7.ntf mail template. The changes do not touch the Out Of Office profile !

Reading the technote mentioned before, I found the following hint:

NOTE: The DWA7 client that ships with the Notes/Domino 7.0.2 release is incompatible with all previous versions of Notes.

All previous versions of Notes? Does this mean version 7.0.1, too ?
To make a long story short; yes it means that version 7.0.1 is not compatible with dwa7.ntf shipped with client version 7.0.2.

And yes, we have some clients still using this version. Exactly the same users who are not able to disable the Out of Office agent are on this ‘old’ client version.

To solve the puzzle, I will have to update the clients ASAP J

Another option ( according to the technote ) is to grant designer access. I used the following code to do the changes out of the Domino Directory.

Create a new agent in the DD ( Select from menue, All selected documents ) and copy the following code into the agent.

Option Public
Option Declare

'Use "OpenLogFunctions"
Sub Initialize
	'On Error Goto Errorhandler
	Dim ws As New NotesUIWorkspace
	Dim session As New NotesSession
	Dim db As NotesDatabase
	Dim dc As NotesDocumentCollection
	Dim doc As NotesDocument
	Dim total As Long
	Dim docnum As Long

	Set db = session.CurrentDatabase

	Set dc = db.UnprocessedDocuments
	total = dc.Count
	docnum = 0

	Set doc = dc.GetFirstDocument
	While Not doc Is Nothing
		docnum = docnum + 1
		Call UpdateStatusBar(docnum, total)
		Call ProcessPersonDoc(doc)
		Set doc = dc.GetNextDocument(doc)
	Wend

	Call ws.ViewRefresh
	'Exit Sub

Errorhandler:
	'Call LogError
	'Exit Sub

End Sub

Sub UpdateStatusBar(x As Long, total As Long)
	'This will display the percentage complete in the status bar as the agent runs

	Print "Working..." & Cstr(Round((x / total), 2)*100) & "% done"

End Sub

Sub ProcessPersonDoc(doc As NotesDocument)
	'On Error Goto stackError
	Dim s As New NotesSession
	Dim profile As NotesDocument
	Dim owner As String
	Dim ACL As NotesACL
	Dim ACLEntry As NotesACLEntry
	Dim nn As NotesName

	Dim Maildb As New NotesDatabase( doc.MailServer(0), doc.MailFile(0) )
	If Maildb.IsOpen Then
		Print( "Succesfully opened " & Maildb.Title )
		Set profile = Maildb.GetProfileDocument("CalendarProfile")
		Set nn = s.CreateName ( profile.Owner(0) )

		Set ACL = MailDB.ACL
		Set ACLEntry = ACL.GetEntry ( profile.Owner(0) )
		If Not ( ACLEntry Is Nothing ) Then
			ACLEntry.Remove
			ACL.Save
		End If

		'Set OWNER access to DESIGNER
		Set ACLENtry = New NotesACLEntry ( ACL, profile.Owner(0), 5 )
		ACLENtry.CanDeleteDocuments = True
		ACLENtry.CanCreateLSOrJavaAgent = True
		ACLENtry.IsPerson = True
		ACL.Save

	End If

EXITPOINT:
	'Exit Sub
stackError:
	'Call LogError()
	'Resume EXITPOINT
End Sub

Now you can select one or more persons and run the agent against their mail file. The agent will read the calendar profile to determine the mail file owner and then changes the ACL.


Compare Two Arrays

For one of my projects I needed a function to compare two arrays. The following function returns true if both array have the same elements (regardless of their position in arrays).

Function ArraysAreEqual (vA As Variant, vB As Variant) As Variant

	Dim IsEqual As Variant
	ArraysAreEqual = True

	Forall a In vA
		IsEqual = False
		Forall b In vB
			If a = b Then
				IsEqual = True
				Exit Forall
			End If
		End Forall
		If Not IsEqual Then
			ArraysAreEqual = False
			Exit Function
		End If
	End Forall

	Forall b In vB
		IsEqual = False
		Forall a In vA
			If b = a Then
				IsEqual = True
				Exit Forall
			End If
		End Forall
		If Not IsEqual Then
			ArraysAreEqual = False
			Exit Function
		End If
	End Forall

End Function

To execute your code only when both array are different simply use

	If Not (ArraysAreEqual ( mBefore, mAfter )) Then
	   ' your code goes here
           ' ...

	End If

Delete Group Members Using The Administration Process

Recently, our company is evaluating a 3rd party mail archiving solution. This solution stores mails together with a snapshot of the ACL. (non-Notes) This is a clever solution, because you have Notes security on these archived documents ( client and web ). I do not want to dig too deep into this product, but we found out during evaluation that the â??ACL snapshotâ? feature will get you into trouble when you delegate your mail file.

Imagine a scenario, where User A delegates his mail file to user B. User B has author access (this necessarily includes reader access. ï? ) When the mail archive process starts, it will save the ACL together with the document. If user B retrieves a document from the archive, thereâ??ll be no problem at all.

Now user B quits the company and he /she is replaced by user C. User A modifies the delegation profile according to the new situation.

But what happens, when user C wants to access documents that have been archived, before he / she had access to the mail file?

To make a long story short, this will not work â?¦

To solve the issue, we decided to put a group into each mail file ACL which has the following format: #ARC-FirstNameLastName-READER.
As the name implies, the access level for this group is READER.

When we now send a mail document to the archive, this group is archived as well. (ACL)

Now we can put user C into this group and immediately this user has access to all archived mails of user A.
Keep in mind that regardless of which access level is given to a user by delegation, he needs at least reader access to access documents from within the archive.
Manually adding members to a group or deleting them is not a good idea, because YOU would have to do the work �.

One of the proposals from the vendor of the mail archiving system was to modify the delegation process in Lotus Notes. Not a good idea at all, because you would have to write a completely new CalendarProfile to achive the goal.

The smallest solution is to have the above mentioned group in the ACL (and names.nsf ) and add code to the CalendarProfile to add / remove members to / from the group. This would keep the code provided by IBM intact. In addition to that you can update to a higher version of Notes and Domino and easily add your modifications to the new template.

The basic algorithm is to add all mail delegates to the group and remove a name from this group when the mail file owner revokes access to his database.

HINT: This article is not ment to be a solution which can be copied and pasted. You will not find any source code here. I will only post a few code snippets.

AdminP is a server task for automating administrative tasks in the background on a schedule. The Domino administration process (AdminP) is a server-side mechanism for automating administrative tasks in the background on a specified schedule. Domino’s AdminP supports everything from user renames to file replications.

Starting with version 6 of Lotus Notes and Domino, you can use the NotesAdministrationProcess class to create AdminP request programmatically with Lotus Script.

One of the methods of the NotesAdministrationProcess class is â??AddGroupMembersâ?.
This method adds members (passed as a parameter in the method call) to an existing group or creates the group first when it does not exist and adds the members to the newly created group.

This is a great feature if you want to enable some users in your organization to maintain groups in the names.nsf without giving them any author or editor rights. Exactly what we need.

But, when doing so, how can they delete users from existing groups using AdminP ? You do not find any method like â??RemoveGroupMembersâ? in the NotesAdministrationProcess class.
Since IBM does not provide us with such a function, I had to create it on my own.

Admin4.nsf - view

Bob Balfe of IBM published an article back in 2003 on developerworks ( LINK )

This is a great starting point to write your own AdminP request handlers using the Notes C API.
As described in the article, I created a new form in the admin4.nsf to contain all the fields needed for the new Administration Request.

adminplus request

I saved the compiled nadminplus.exe to the Domino executable directory and started it typing load nadminplus at the server console.

server console with adminplus

You can now create new RemoveGroupMembers request directly in the admin4.nsf or use the following code to create the requests programmatically with Lotus Script.

'/* Put the following code into the declaration section of an action */
'/* or create a new script library to contain the code */
Const DB_ADMIN4 = "admin4.nsf"
Const FLD_FORM = "CustomRequest"
Const FLD_PROXYACTION = "5005" ' RemoveGroupMembers | 5001

Class NotesAdministrationProcessPlus

	Private szServer As String

	Public Sub new (szServerName As String)
		Dim s As New NotesSession
		Dim nn As NotesName
		Set nn = s.CreateName (szServerName)
		szServer = nn.Canonical
	End Sub

	Public Function  RemoveGroupMembers (ListName As String, Members As Variant) As String
		RemoveGroupMembers = ""
		If  (Ubound (members) = 1 And members(0) ="") Or Trim(ListName) = ""  Then
			Exit Function
		Else
			Dim s As New NotesSession
			Dim db As New NotesDatabase( szServer, DB_ADMIN4 )
			Dim doc As NotesDocument

			If db.IsOpen Then
				Set doc = db.CreateDocument
				doc.Form = FLD_FORM
				doc.ProxyAction = FLD_PROXYACTION
				doc.ProxyServer = szServer
				doc.ListName = ListName
				doc.Members = Members
				Call doc.ComputeWithForm(False, False)
				Call doc.Sign
				Call doc.Save(False, True)
				RemoveGroupMembers = doc.NoteID
			Else

			End If
		End If

	End Function
End Class

To create the request documents, use the following code:

Sub Click(Source As Button)
	Dim noteid As Variant
	Dim members(1) As String
	members(0) = "Hein Bloed/Maus/de"
	' ...

	Dim AdminPP As New NotesAdministrationProcessPlus ("yourserver")
	noteid = AdminPP.RemoveGroupMembers ("yourgroup", members)
	' ...

End Sub

See the code in action: http://screencast.com/t/htEtry53BSk

If you find this function useful and like to try it by yourself, send me an email or leave a comment. I have also posted an idea on ideajam.net. Perhaps you can promote the idea if you like it.


The LotusUserGroup.org Blogger Awards

“The LotusUserGroup.org Blogger Awards recognize the importance of blogging in the Lotus world and celebrates the contribution of bloggers to the Lotus community.
Although we recognize that all bloggers provide a valuable contribution and an important service to the community, this award will go to the blogger who, over time, has provided exceptional information, education and community support through his or her blog in an entertaining (or engrossing) format and style.”


Nominations will be open from November 19 â?? December 17, 2007