I require a real name (or well-known handle) and a real email address. If the address sounds bogus or made up, I reserve the right to delete the comment. Same thing for trolls. You can be critical of what I write about, but then you must come with some valid arguments. Just saying “Notes sucks”, “Android sucks”, or anything similar is not constructive. If you think a product I write about is not good, explain why.

Like this:

After updating the blog to the iFeature Pro 5 theme, comments are not being displayed. The contents is there, but something in the template code prevent them from being displayed. I have contacted their support, and hope to have it working soon.

There are also a couple of other issues that I (as well as other users) experienced and reported, and the makers of the theme are in the process of fixing it. That is why the slider at the top of the main page is gone. The major issue is however that images are not being inserted. They have to be coded by hand using HTML, after being uploaded to the blog. A fix is promised for the next version, due out in a few days.

In this post in the developerWorks forum, Andy Herlihy is asking about how to create a small calendar that can be embedded into an existing intranet website. As Carl Tyler points out, Andy could simply use Dojo.

However, this is a good example to show some jQuery combined with the power of IBM Lotus Domino. Lets’ break it down into a few smaller steps.

The first one is to create a Domino web agent that will take the current date and build a calendar for that month. There will be no links or javascript code in the HTML generated, just plain HTML code, with some id attributes to make it easy to address different cells later.

The next step is to create a very simple webpage, with some Javascript to load jQuery and set up the calendar to detect clicks. The clicks will cause another call to the Domino server, this time to a view using RestrictToCategories to only get the entries for the specified date. The entries are returned as HTML and through jQuery they are displayed in a div on the webpage. We also want to add a little bit of CSS to make the calendar pretty. The CSS also lives on the HTML page.

Finally we create the view, it’s associated view template form and a form to create some entries that we can use for testing.

Let’s look at the code. First the Domino web agent. It should be pretty self explanatory:

I am setting the id attribute on the cells to the date in yyyy-mm-dd format, and I will also use that in the categorized view that will later use. Using ISO 8601 for dates have several advantages, in our case particular because we don’t have to worry about the / character that will mess up the URL to the Domino view we will call later.
I also use class attributes on the cells, so CSS can be used to easily format the calendar.
Next we create the web page where we will insert the calendar and also display the entries for any selected day. We load jQuery from Googles CDN, and after the DOM is fully loaded by the browser, we make an ajax call to the Domino server and get the HTML of the calendar back.

After the calendar is retrieved, we use jQuery to trigger a Javascript function on click on any date cell. The code will detect the id of the cell, which just happens to be the date, and then performs another ajax call to teh Domino server, this time to the view to return all entries for the selected date. The data returned is then inserted into a div.

What’s left to do to get this all to work is to create the following Domino design elements:

A form to use for entering calendar data. I called it “Calendar Entry”, and just put two fields on it, ‘CreatedDate’ (computed for display, using @Now) and ‘Title’ (text field).

A view called ‘CalendarView’, with two columns. The first one is categorized and is displaying the created date in yyyy-mm-dd format, while the second one is displaying the title field and adding an HTML line break after. The view is set to treat content as HTML.

A form called ‘$$ViewTemplate for CalendarView’, set to treat form as HTML. The form only contains an embedded view element, pointing to ‘CalendarView’, and it is set to return data as HTML as well.

This is the formula I used in the first column of the ‘CalendarView’ view:

And this is what it looks like when finished:
This is just one example of how you can combine Domino (agents, views and forms) with jQuery in order to integrate Domino based data into your web applications.

Like this:

I blogged about how to make this popular Swedish desert here. For these two pans I used 150% of the receipt, so 9 eggs, 3/4 cup sugar, etc.
I also want to wish everyone of my American friends and readers a Happy Thanksgiving.

Like this:

A question I have seen a few times in the developerWorks forums is how to detect what values (often names) have been added in a multi-value field.

This is not very difficult to do in Lotusscript, and there are a few different ways to do it. I prefer to use lists, but you can of course use arrays as well. The basic idea is to declare a global variable to hold the initial value of the field, populate it when the document is either opened or put into edit mode, and then checked when the document is saved.

Globals:
Dim oldValue List As String
PostModeChange:
Dim oldarray as Variant
'*** Create array, assume ; as item separator in field
oldarray = Split(uidoc.FieldGetText("myMultiValueField"),";")
'*** Build a list of values
ForAll o in oldarray
oldValue(o) = o
End ForAll
QuerySave:
Dim newarray as Variant
Dim newValue List As String
'*** Create array, assume ; as item separator in field
newarray = Split(uidoc.FieldGetText("myMultiValueField"),";")
'*** Compare with values in list
ForAll n in newarray
'*** Check if value is not in global list, then it is new
If IsElement(oldValue(n)) = False Then
newValue(n) = n ' Add new value to list
End If
End ForAll
'*** Loop through all new values and print them
ForAll nv in newValue
Print nv + " is new."
End Forall

The same technique can be used to detect what fields have changed since the document was opened. Just store the values of all fields (except any starting with $) in a list, then check the values in the fields against that list when saving the document.

Globals:
Dim oldValue List As String
QueryOpen:
'*** Build a list of values with field name as listtag
ForAll i in doc.Items
If Left$(i.Name,1)<>"$") Then
oldValue(i.Name)=i.Text
End If
End ForAll
QuerySave:
Dim modified List As String
Dim tmpValue As String
'*** Compare current fields with values in list
ForAll o in oldValue
'*** Check if value is the same or not
tmpValue = uidoc.FieldGetText(Listtag(o)) ' Get current field value
If tmpValue <> o Then
modified(ListTag(o))=tmpValue ' Add new value to list of modified fields
End If
End ForAll
'*** Loop through all modified fields and display new value
ForAll m in modified
Print Listtag(m) + " was changed from " + oldValue(Listtag(m)) + " to " + m
End Forall

All very easy when you know how to do it. And again, it shows the power of lists.

Like this:

While reading the developerWorks forums, I have noted that some tasks seem to be common, and users often have issues with it. One very common is to export data from Notes/Domino to Excel. My guess is that some manager/executive want to get the data to manipulate and analyze it in Excel, which they know better, and where reporting can be done easier.

First of all, for anyone that want to do real integration with Excel (or Word, or any other office program), I would suggest to look at the presentations given by John Head at Lotusphere and other conferences in the past:
Lotusphere 2011 – JMP208
IamLUG 2009 – Integration and Coexistance
Lotusphere 2006 – BP309
Lotusphere 2005 – JMP108

But if you just need to export raw data to Excel, there are a couple easy ways to do that. You don’t need to automate Excel, something the programmers posting in the forums seem to frequently do. That just makes things more complicated, and if you run the code in a server agent, Microsoft Office have to be installed on the server itself. Different versions of Excel also cause different issues.

The different methods I use to export Notes data to Excel are as follows:

Create a CSV file, which can be opened in Excel

Create a HTML table in a file with .xls extension, which can be opened in Excel

Create a HTML table and return it through a browser, with a content type set to open in Excel.

Depending on what the requirement is, I usually choose one of those method.

Method 1 – CSV file (local)

The easiest way to get data from Notes to Excel (or any other spreadsheet program) is to simply save the data as comma-separated values (CSV). Use regular Lotusscript file operations and write the values to the file, encased in double quotes and separated by a comma. You need to build a string containing a complete line, as the Print statement adds a line break to the end automatically.

The first row is the header, with the field names listed. This helps on the receiving side, but is optional. Dates and numbers don’t need quotes around them, as long as they don’t contain commas. So make a habit to format any numbers without commas.

Method 2 – HTML file (local)

This method is very similar to the CSV method. The difference is that you create a table in HTML, matching the cells in Excel you want to create/populate. But instead of creating a file with the extension .htm or .html, you give it the extension .xls. Excel is intelligent enough to identify it as HTML and map the content correctly.

The biggest advantages of using a HTML file instead of CSV is that you get more control over the formatting. By using colspan and rowspan, you can merge cells together, for example in a header. You can also use markup to make cells bold or italic, or even set the text and background colors.

Method 3 – HTML (through browser)

This method is a variant of method 2. But instead of calling the agent inside the Notes client and creating a file somewhere in the file system, the agent is called through a URL. This means the Domino HTTP task must be enabled on the server. The URL can be called from inside the Notes client using the @URLOpen function, or the OpenURL method of the NotesUIWorkspace class.

Instead of writing to a file, use the Print statement to print to the browser. The first line printed must be the content type, so the browser realize what application to open the file in. For Excel, it looks like this:

Print "content-type:application/vnd.ms-excel"

It also works with (among other) “application/msexcel” and “application/xls”, but the one above is the official one, so I suggest using that.

After you print the content type, simply print the HTML table code to the browser. This will open the HTML in Excel after the agent is done. It’s that easy.

Like this:

This morning, IBM presented the latest version of Notes and Domino. The new product name is IBM Notes 9.0 Social Edition. As you notice, the Lotus name is now gone, and the look is changed to look more like other IBM applications, with a more modern design. There are also changes and updates to the user interface inside the different parts of the client.

IBM Notes 9.0 Social Edition – Welcome Screen

One thing, totally new for Notes, is that tutorials and training videos are available in the client. The tutorials are not just for new functions, but also older tips and tricks that will make the users more productive.

During the presentation, new functions in mail and calendar were demonstrated. One function that will surely be popular with users is to group mail by date:

Other new features shown were the ability to color code different categories of meetings using custom colors and improved monthly view, as well as a weekly planner taken from Organizer.

The activity stream is using the OpenSocial standard, and Domino is now supporting OAuth and SAML for authentication. Customers can however deploy Notes 9.0 without the Social Edition functions, and add them later.

Not only has the traditional Notes client been updated, iNotes is also updated to look even more like the rich client. One of the biggest news in this version is the Notes browser plugin, that allow user to run traditional Notes applications directly in the browser, in full fidelity with no Notes client installed. The new version of iNotes also contains the new activity stream, as shown in the image below.

The new version of Traveler will (in addition to iPhone and Android) also support the Blackberry 10 platform and Windows Phone 7.5/8, and now also be available for IBM iSeries.

A public beta version of Notes 9.0 Social Edition will be available December 14. For previous versions of Notes, since (if I remeber correctly Notes 5), IBM have been doing managed beta testing and not released public beta version.
The final version is planned for Q1 2013. IBM also outlined the future roadmap for the next couple of years, which included a new major realease in 2015:

Like this:

You can now sign up for email (or SMS) notification from NASA when the Internation Space Station (ISS) is visible in your area.

NASA’s Spot the Station service sends you an email or text message a few hours before the space station passes over your house. The space station looks like a fast-moving plane in the sky, though one with people living and working aboard it more than 200 miles above the ground. It is best viewed on clear nights.

Like this:

I am not sure if I am misunderstanding something, but the new Nexus 4 seems to be sold unlocked for $299 (8 GB model) and $349 (16 GB model) when Google start selling it next week.

The phone is built by LG, has a 4.7 inch screen with 128 x 768 resolution and a Dualcore Snapdragon S4 Pro processor. The radio part support GSM/HSPA+/EDGE/GPRS on all the major frequencies, so it shold work both in the USA and on the international market.

The battery has a 2100 mAh capacity, the phone weighs 139 gram and contains a 8MP camera, GPS and all the other sensors we expect today, and it is runing Android 4.2 (Jelly Bean). Yes, not the 4.1 flavor of Jelly Bean, but the latest version.

The specifications are just below the ones for Samsung Galaxy SIII, and most notable is that (like the other Nexus products) it does not offer memory expansion through SD cards. It also lack LTE support.