Usability - Productivity - Business - The web - Singapore & Twins

This article is part of a mini series. Read them all (latest on top):

eMail Dashboard

email Dashboard for the rest of us - Part 2

In Part 1 I introduced a potential set of Java interfaces for the dashboard. In this installment I'll have a look on how to extract this data from a mail database. There are several considerations to be taken into account:
  • The source needs to supply data only from a defined range of dates - I will use 14 as an example
  • The type of entries needed are:
    • eMails
    • replies
    • Calendar entries
    • Followups I'm waiting for
    • Followups I need to action
  • Data needs to be in details and in summary (counts)
  • People involved come in Notes addresses, groups and internet addresses, they need to be dealt with
Since I have more than a hammer, I can split the data retrieval into different tooling. Dealing with names vs. groups is something best done with LDAP code or lookups into an address book. So I leave that to Java later on. Also running a counter when reading individual entries works quite well in Java.
Everything else, short of the icons for the people, can be supplied by a classis Notes view (your knowledge of formula language finally pays off).To make this really fast, two things need to be taken care of:
  1. All information needed has to be in the view, so a ViewNavigator is sufficient in providing the data. ViewNavigators are fast
  2. The view should only contain relevant data: in my example 14 days. Now the tempation would be big to use @Today in the view selection formula - which is a bad idea for performance. I will use a static value, that is replaced by Java code on an as-needed basis
So here we go. My view called ($DashboardProvider) consists of one view selection formula and 5 columns:

View Selection Formula

ExcludedForms := "Group":"Mailrule":"Person":"(GroupCalendar)":"STMeeting":
                 "Personal Stationery":"NonDelivery Report":"eProductivityShadowEmail";
StartDay := 20150328;
EndDay   := 20150413;
FullDate := @If(FollowUpDate != ""; @Date(FollowUpDate);
                DeliveredDate != ""; DeliveredDate;
                PostedDate != ""; PostedDate; @Created);
EntryDate := @Year(FullDate)*10000+@Month(FullDate)*100+@Day(FullDate);
SELECT @IsNotMember(Form;ExcludedForms)
       & !@IsAvailable($Conflict)
       & (EntryDate > StartDay)
       & (EntryDate < EndDay)

One little catch here: repeating entries and multi-day events carry all date values, so this needs to be taken care of in the Java class

Column 1: Date as number (categorized)

FullDate := @If(FollowUpDate != ""; @Date(FollowUpDate);
                DeliveredDate != ""; DeliveredDate;
                PostedDate != ""; PostedDate;

Column 2: The form (almost)

@If(FollowUpDate != "";

Column 3: The person

eMailNames := @If(From=@UserName;SendTo;From);
allNames   := @If(@IsAvailable(Chair);Chair;eMailNames);
candidates := @Name([Abbreviate];@Trim(@Unique(@Replace(allNames;@UserName;""))));
result     := "";
elements   := @Elements(candidates)+1;
@For(x := 1; x< elements; x :=x+1;
      tmp := @Explode(candidates[x];"@");
      result := @Trim(result:
                      @If((@Elements(tmp)>1) & @Contains(@Subset(tmp;-1);".");

Column 4: Start time (mostly needed for calendar)


Column 5: the subject


Using this view, all information that will form the data for the email dashbaord can be retrieved easily. The next task at hand, for the next installment: build a Java implementation that checks the view, the selection formula and implements our interfaces defined in the first article.
Stay tuned!

Posted by on 12 April 2015 | Comments (1) | categories: IBM Notes XPages


  1. posted by Eric Mack on Monday 13 April 2015 AD:
    Nice overview Stephan. Good to see that you continue to think and develop outside of the box.

    All the best!