EntwicklerCamp Agenda Database

Requested by those who have used our popular Lotusphere Sessions database, we have built a Journal database containing all the sessions listed on the official EntwicklerCamp site. This database is based on the personal ND6 Journal with a few added views, so it should synch with the Palm Pilot and other smart phones, but it also contains a wealth of useful information for planning out your schedule. Modify it all you want or make suggestions at Ben.Langhinrichs@GeniiSoft.com for ways that we can make it more useful for you.

Ben Langhinrichs

Thank you for this, Ben!


ILUG 2008 Registration Is Open

Not yet, but on Monday, 25-Feb-2008 ( 1pm GMT ) you can register for ILUG 2008.

The event will once again be held in Dublin, Ireland. It will start on Wednesday morning, June 4th and will run through the afternoon of Friday,June 6th. The event will be held at the Griffith Conference Center. The organizers are in the process of planning the agenda and gathering speakers. A high level of quality is guaranteed, both in terms of speakers and content. With an additional day this time, you’ll be getting even *more* than last year!

So do not miss Monday, 25-Feb-2008. Seats might be “sold out” in minutes 🙂


Use mail.box When Multiple mail.boxes Are Enabled

When multiple mail boxes are enabled, they are titled mail1.box, mail2.box, and so on and the router uses these mail boxes for routing messages.
To force the router to use “mail.box”, add the parameter to the notes.ini file:

Mail_Enable_Mailbox_Compatibility=1

The parameter keeps the “mail.box” file and still will create mail2.box, mail3.box, and so on.
This is useful if you have a third party applications that requires the existence of a “mail.box”.


Domino Directory – People By Client Version

Lotus Notes stores the currently used client version for each user in the user’s person record in the Domino Directory.
It also stores the client version previously used. The information is automatically updated by the Notes client.

Release Overview

One of many new feature in Notes / Domino 8 is a Notes client version view in the Domino Directory.

The Domino Directory contains a People – by Client Version view that you can use to quickly see what versions of the Notes client are deployed on users’ computers in your domains. ( from: What’s new in IBM Lotus Domino 8 and 8.0.1? )

People - By Client Version

The view looks like this

Old View

Indeed, it shows the client versions in your domain. But can it really be used to “quickly see what versions of the Notes client are deployed on users’ computers in your domains”? NO. The view displays ALL releases ever used in your domain. Not very useful.

I changed the view to only display the currently used client version as category. The main problem when designing the view was the fact the the client version information is stored in different fields in the person record. In addition to this, it is stored unsorted.
So a simple @Subset command to get the first ( or last ) entry of the ClntBld field does not neccessarily return the Notes Client version that is currently used by a user.

A great function which is available from version 6 on is @Sort. @Sort can be used in view columns and the greatest trick is custom sorts using the [CustomSort] keyword.

The first column ( categorized, descending ) of the new view contains the following formula.

_list:= ClntBld  + " - "  + @Text(@ToTime(ClntDate)) ;
_Sorted:=@Sort(_list; [CustomSort];
@ToTime(
@Trim(@RightBack($A; " - "))
) < @ToTime(
@Trim(@RightBack($B; " - "))
)
);
@Subset(@LeftBack(_Sorted; " - ");1)

Parts of this formula are 'stolen' from Rocky Olivers presentation 'AD 304 - Formula Follies and LotusScript Lunacy: Coding Feats that Will Amaze'.
The "All Releases" column contains the same formula, except the last @Subset command. The option for multiple values is set to "New Line".

The result looks like this.

New View

This gives you a better overview about the client versions currently in use than the original view shipped with release 8 of Lotus Notes / Domino.


Get A JSONReader And JSONWriter For FREE

JSONTroy Reimer of SNAPPS donates LotusScript JSONWriter and JSONReader to the community.
You can download Version 1.0 of JSONReader and JSONWriter here.

The database (json.nsf) contains LotusScript classes for parsing and creating JSON text.
These classes are contained in five script libraries: ls.snapps.JSONArray, ls.snapps.JSONObject, ls.snapps.JSONReader, ls.snapps.JSONWriter, and ls.snapps.JSONWrapperConverters.

The JSONArray and JSONObject classes are wrapper classes that are used by the JSONReader class. Additional information can be found in the “Help – About This Database” document.

The JSON LotusScript Classes are also available on OpenNTF.


SnTT: @ServerAccess in LotusScript

SnTT

You can use @ServerAccess to check if a specified user has a specified administrative access level to a server. For a list of keywords to represent the access level you want to check for take a look at the designer help either on your local client or on the web.

But what to do if you want to check the server access level using Lotus Script? The help document does not give you a cross reference to Lotusscript.

In this case, the Evaluate statement is your friend.
For further information about how to use Evaluate I recommend to read the following article on DeveloperWorks: “Simplifying your LotusScript with the Evaluate statement

The following function uses evaluate and @ServerAccess to make the @function available in LotusScript.

Function atServerAccess ( 
sAction As String, sUserName As String, sServerName As String ) As Boolean
  Dim vAccess As Variant
  vAccess = 
   Evaluate(|@ServerAccess(| + sAction + |; "| + sUserName_
                + |"; "| + sServerName + |")|)	atServerAccess = Cbool(vAccess(0))
End Function

Here is a sample of how to call the function

Sub Click(Source As Button)
  Dim sUser As String
  Dim sServer As String
  Dim sAction As String
  sUser = "Bill Gates/Microsoft"
  sServer = "MyServer/foo"
  sAction = "[RemoteAccess]"

  ' returns TRUE of FALSE
  Msgbox atServerAccess ( sAction, sUser, sServer )
End Sub


What Is Wrong With Year 1700?

2008 is a leap year again. The Gregorian calendar, the current standard calendar in most of the world, adds a 29th day to February in 97 years out of every 400, a closer approximation than once every four years. This is implemented by making every year divisible by 4 a leap year unless that year is divisible by 100. If it is divisible by 100 it can only be a leap year if that year is also divisible by 400.

So, in the last millennium, 1600 and 2000 were leap years, but 1700, 1800 and 1900 were not. In this millennium, 2100, 2200, 2300, 2500, 2600, 2700, 2900 and 3000 will not be leap years, but 2400 and 2800 will be. You can find numerous examples in almost every programming language of how to determine if a year is a leap year or not.

In LotusScript as well as with @Formula you can “adjust” a given date to another date depending on the parameters you use. So the easiest method to determine a leap year is to set the date to March, 1st of the given year and “substract” one day. If the resulting date is Feb., 29th, the year is a leap year.

Here is my @Formula

_date:=[01.03.1700];
@Prompt([Ok];"Last Day";@Text( @Day( @Adjust( _date; 0;0;-1;0;0;0 ) ) ) )

I expected a 28 in the message box, but it prompted 29 ! Oups …

I tried the same using LotusScript and the NotesDateTime class

Sub Click(Source As Button)
	Set dt = New NotesDateTime( Datenumber( 1700 ,3, 1) )
	Call dt.AdjustDay (-1)
        Msgbox dt.Localtime
End Sub

Guess what it returns. 29.02.1700 ! Another oups …

Seems that IBM / Lotus uses another calender than the Gregorian calendar. No surprise is that 🙂

You might want to try the next piece of code and watch what happens …

Sub Click(Source As Button)
	Set dt = New NotesDateTime( Datenumber( 1700 ,3, 1) )
	Call dt.AdjustDay (-1)
	Msgbox Day (dt.Localtime)
End Sub

An error message occurs, stating that there is a “Type mismatch”. I guess that some subroutines deep in the core code are not sure which calendar to use; Gregorian or IBM calendar. By the way, you get the same error when replacing the 1700 by 1500, 1400, 1300, 1100 and 1000.

If you happen to travel to the year 1700 using a time machine, be careful when planning a meeting at the end of February …


BlackBerry Platform Enhancements

RIM) announced a series of updates for its BlackBerry® platform that include enhanced messaging and collaboration, simpler management, enhanced security and expanded application development support.
These new BlackBerry platform enhancements are scheduled to be phased in to new software releases during the first half of 2008.

My favorites are

  • Remote Search for Messages â?? Users will be able to search for and retrieve email messages from their email server even if the message is no longer stored on their BlackBerry smartphone.
  • Over-the-Air Device Software Upgrades â?? Organizations will be able to update a user’s BlackBerry device software wirelessly, delivering a fast, cost-effective method for remotely supporting users and managing BlackBerry device software lifecycles

For more information, read this press release


‘Merge Replication Conflicts’ does not work as expected in Notes 7.0.3 or 8.0

Although the Form property “Merge Replication Conflicts” is enabled, and the Form contains a $ConflictAction field, a replication conflict occurs when modifications are made to different fields in a database.

1. Create a Form that contains two fields.
2. Enable the Form property, “Merge Replication Conflicts”.
3. Create a document based on the new Form.
4. Create a replica of the database.
5. Modify one field in one replica and the other field in the other replica.
6. When replication occurs, no conflict is generated and the later modified document is what is replicated to all other servers. The modifications made in other replicas documents are lost.

IBM Source

Thanks to Gabor for the hint