Unread Navigator
Category lotus notes
I thought I'd take a break from what is turning out to be the encyclopedia hodgebloge entry on web unread marks to show you another little unread favorite of mine, the unread navigator. I integrate this into a "splash" screen for a database frameset along with several other helpful "widgets" for the user. Most of the applications we create have identified "Roles" for the members of the organization, and each role performs different tasks within the database, interacting with different forms, in different ways. The unread navigator gives each one of these users the ability to quickly locate where unread documents are located, and how they would react to them.
I thought I'd take a break from what is turning out to be the encyclopedia hodgebloge entry on web unread marks to show you another little unread favorite of mine, the unread navigator. I integrate this into a "splash" screen for a database frameset along with several other helpful "widgets" for the user. Most of the applications we create have identified "Roles" for the members of the organization, and each role performs different tasks within the database, interacting with different forms, in different ways. The unread navigator gives each one of these users the ability to quickly locate where unread documents are located, and how they would react to them.
As you can see from the screenshot above, this particular application has several different areas where documents reside. In the navigator above, the user is presented with a series of views that are the "base of operations" for a particular task or document type, along with its matching icon for quick reference (as is well told on other blogs, interface matters!!) and the number of unread documents they have in that particular view. Clicking the icon or view name takes them directly to that view so they can review those unreads.
So how is it done? Well, first download the NotesUnreadMarks lss from the Unread Marks on the Web via XML series, and create the UnreadMarks LotusScript Library, copying the content of the download into the declarations of the new script library. Then create a form with similar layout and text and fields on it like you see below... (Use your own view name, icons, and wording, of course!!)
And in the PostOpen of the Form include the following LotusScript code:
Use
"NotesUnReadMarks"
%INCLUDE "lsconst.lss"
Sub PostOpen
' Dim Some
Dim session As New NotesSession
Dim db as NotesDatabase
Dim ws as New NotesUIWorkspace
Dim uidoc as NotesUIDocument
Dim doc as NotesDocument
' Set Some
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
' Get this user's unread notes table
Dim UnreadMarks As New NotesUnreadMarks(db, session.UserName)
If UnreadMarks.UnreadNotes.Count = 0 Then
' No unreads .. no need for the overhead below, set 0 and out...
doc.PlanningOutlineUnread = 0
Else
' Dim a new NotesNoteCollection
Dim YourUnreads As NotesNoteCollection
' Set the new NoteCollection, Set FALSE for select all
Set YourUnreads = db.CreateNoteCollection(False)
' We want documents
YourUnreads.SelectDocuments = True
' Set up a selection formula like you would for a View selection formula
YourUnreads.SelectionFormula = {SELECT Form = "YOUR_CRITERA_HERE"}
' Build the collection based on your formula above
Call YourUnreads.BuildCollection
' Here is the trick ... INTERSECT the UnreadNotes collection with the
' selection you just created, the resulting left-over notes in YourUnreads
' is the notes that are in BOTH collections, giving you your list of unreads
' for your criteria....
Call YourUnreads.Intersect(UnreadMarks.UnreadNotes)
' Update the count in the document
doc.PlanningOutlineUnread = YourUnreads.Count
' Repeat the lines above for each line in the unread navigator
' with the proper selection criteria....
End If
' Update the user
Call uidoc.Refresh()
End Sub
%INCLUDE "lsconst.lss"
Sub PostOpen
' Dim Some
Dim session As New NotesSession
Dim db as NotesDatabase
Dim ws as New NotesUIWorkspace
Dim uidoc as NotesUIDocument
Dim doc as NotesDocument
' Set Some
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
' Get this user's unread notes table
Dim UnreadMarks As New NotesUnreadMarks(db, session.UserName)
If UnreadMarks.UnreadNotes.Count = 0 Then
' No unreads .. no need for the overhead below, set 0 and out...
doc.PlanningOutlineUnread = 0
Else
' Dim a new NotesNoteCollection
Dim YourUnreads As NotesNoteCollection
' Set the new NoteCollection, Set FALSE for select all
Set YourUnreads = db.CreateNoteCollection(False)
' We want documents
YourUnreads.SelectDocuments = True
' Set up a selection formula like you would for a View selection formula
YourUnreads.SelectionFormula = {SELECT Form = "YOUR_CRITERA_HERE"}
' Build the collection based on your formula above
Call YourUnreads.BuildCollection
' Here is the trick ... INTERSECT the UnreadNotes collection with the
' selection you just created, the resulting left-over notes in YourUnreads
' is the notes that are in BOTH collections, giving you your list of unreads
' for your criteria....
Call YourUnreads.Intersect(UnreadMarks.UnreadNotes)
' Update the count in the document
doc.PlanningOutlineUnread = YourUnreads.Count
' Repeat the lines above for each line in the unread navigator
' with the proper selection criteria....
End If
' Update the user
Call uidoc.Refresh()
End Sub
That's it, pretty quick and painless, and your users will thank you .... it beats the heck out of searching the database for that elusive one or two unread marks ... and definitely better than important document changes "falling through the cracks".
Oh, and shameless self-promotion time ... If your organization needs a rock-solid, highly customizable project planning solution for all types of projects (who doesn't, btw), no matter how small (say a 4 person 2 hour meeting) up to multiple day events with thousands of guests and millions of dollars in budgets (like a PGA Tour event, or even larger), give me a shout, we've got a solution you probably didn't know you needed!














- 