About Lotus Notes and Domino and more... provided by the Emcon company.

Simple enhancements that makes the Notebook template more useful

Fredrik Malmborg  December 23 2011 08:46:35 AM
My Christmas give away to you all.

Clients wants more of the new look and feel they got in some of the 8.5 templates. Unfortunately IBM has not yet put enough energy into lifting the included templates. We got mail, contacts, notebook and blog that looks rather fresh and use the Composite Application features.

A client needed some place to store agreements and keep track of them. First I suggested using the teamroom template and strip things not needed. Unfortunately the teamroom template does not have the feel of version 8.5.

Solution

What I did was taking the notebook template and add some elements to it. As you see in the picture below there are some additional views.  The included views also have got some additional columns. All changes I suggest are very easy to do.

Image:Simple enhancements that makes the Notebook template more useful

I added this to the notebook template.
  • Views to support the additional features (View)
  • Possibility to set expiry date on document. (Field)
  • Status field to be able to handle unfinished documents (drafts) in the database. (Field)
  • Setting of reviewer / owner for document. (Field)
  • Notification to reviewer / owner when document is about to expire. (Scheduled agent)
  • Document level security. Who may read the document. (Field)

When you create a new document it looks like this:

Image:Simple enhancements that makes the Notebook template more useful

And depending on selections you get additional choices. I find it rather intuitive.

Image:Simple enhancements that makes the Notebook template more useful

Of course you use the ACL as usual to control access to the database. I just added some more detailed controls inside.

Notice the list of notification occasions. You can even use a negative number here, that will send notification after the expiration date.

With some rather small additions we now got a much more useful notebook template, using the new 8.5 look and feel.

Image:Simple enhancements that makes the Notebook template more useful

Exercise in Domino Designer

You need Domino Designer version 8.5 to do this. Preferably 8.5.2 with fixpack or 8.5.3.

I am not going to show you how to create and change the views because I expect you to be able to figure that out yourself.

First you should create a copy of the standard notebook.ntf. Then open that copy in Domino Designer.

First the form changes.

Image:Simple enhancements that makes the Notebook template more useful

Subject, Categories and Body are fields from the original templates. so are the fields at the top of the form.
I use "hide when" settings to make the form more user friendly, but I do not show you all the details of it here.

DocWorkflowType
: Radio button
default value="noexpire"
choices="Does not expire | noexpire", "Expires | expires"
enabled "Refresh fields on keyword change".

DocExpiresDate
: Date/Time
default value=@Adjust(@Date(@Today);1;0;0;0;0;0)
input translation=@If(DocWorkflowType="noexpire"; ""; @ThisValue)
hide when=DocWorkflowType="noexpire"

DocNotify
: Number, no decimals
default value=0
input translation=@If(DocWorkflowType="noexpire"; 0; @ThisValue)
hide when=DocWorkflowType="noexpire"

DocStatus
: Radio button
choices: "Draft | Draft", "Published | Published"

DocOwner
: Names - Use address dialog for choices.
default value=@UserName

DocAccess
: Radio button
default value="All"
choices="Unrestricted | All", "Selected readers | Selected"
enabled "Refresh fields on keyword change".

DocReaders
: Names - Use address dialog for choices. Allow multiple.
default value=""


The hidden fields at the bottom is the ones that enables most of the new features.

Main Readers
: Computed Readers. Allow multiple.
This restricts read access to the document if enabled by the author. There is a role [ReadAll] added to enable database admin to access all documents. If the database is going to be replicated to other servers, the replicating servers needs to have this role to be able to replicate all documents.
value=@If(DocAccess="All"; ""; @Trim(DocReaders:"[ReadAll]"))

MainAuthors
: Computed Authors. Allow multiple.
This enables the author to change the document later. Of course this is depending on how the ACL is setup, but this supports users with Authors level in the ACL.
value=DocOwner

NotificationDates
: Computed Date/Time. Allow multiple.
This creates a list of dates when notification should be sent. Notifications are sent to the Reviewer / Owner by a scheduled agent.
value=@If( (DocWorkflowType="noexpire") | (DocNotify=0) | (DocStatus="Draft") ; @Return(""); "");
@For(n := 1;
n <= @Elements(DocNotify);
n := n + 1;
oneEntry := @Adjust(DocExpiresDate;0;0;-DocNotify[n];0;0;0);
result := @If(n=1; oneEntry; (result : oneEntry))
);
result


To get the notifications sent you need a scheduled agent. I call mine "SendNotifications".

Image:Simple enhancements that makes the Notebook template more useful

In the "Schedule..." you preferably set it to run in the early morning because then you get the notifications to the reviewers in time to have a full day to handle it.
You need to have the agent to run every day, else you risk that you miss sending notifications. I have not put in any handling of missed notification occasions

Image:Simple enhancements that makes the Notebook template more useful


Action=
@If((NotificationDates != "")  & (DocStatus="Published") & (@IsMember(@Text(@Today); @Text(NotificationDates)));
@MailSend(DocOwner; ""; ""; "Reminder - Document about to expire in \""+@DbTitle+"\""; "\""+Subject+"\" expires on " + @Text(DocExpiresDate) + ".  Please review it as soon as possible. (This message is sent automatically by the server)"; "" ;[IncludeDoclink]); @Return(""));
SELECT @All

This code sends an email to the person in the Reviewer/Owner field. It tells about which database and document and when it expires. It also contains a document link to the specific document. The server that runs the agent will be the sender.


In the views I put in a view selection to enable the "Status" feature.

Image:Simple enhancements that makes the Notebook template more useful


Hope this will be helpful and makes your users even happier about the usefulness of Lotus Notes.
Comments

1Kevin Pettitt  12/23/2011 2:28:15 PM  Simple enhancements that makes the Notebook template more useful

Very well done Fredrik. I'm sure this will help a lot of folks looking to do this sort of thing. Thanks!

2Patrick Kwinten  01/14/2012 4:10:43 PM  Simple enhancements that makes the Notebook template more useful

I support more IBM template improvements.

You could create a project for this template on OpenNTF ?