Open Navigator By Role

This routine accepts 2 arrays and a string. The first array is a list of roles,
the second array is a list of corresponding navigators, and the last parameter
is the default navigator to display.

When called, the routine will open the spcified navigator according to the
first matching role the user has.
Sub OpenNavbyRole(Roles() As String, Navs() As String, DefaultNav As String)
Dim Session As New NotesSession
Dim CurDB As NotesDatabase
Dim WS As New NotesUIWorkspace
Dim Ans As Variant
Dim Cnt As Integer
Dim NotesMacro As String

For Cnt = 0 To Ubound(Roles)
NotesMacro = {@IsMember("} & Roles(Cnt) & {"; @UserRoles)}

Set CurDB = Session.CurrentDatabase
Ans = Evaluate(NotesMacro)

If Isarray(Ans) Then
Forall v In Ans
If v = 1 Then
Call WS.OpenDatabase(CurDB.Server,CurDB.Filepath, Navs(Cnt),"0")
Exit Sub
End If
End Forall
End If

Call WS.OpenDatabase(CurDB.Server,CurDB.Filepath, DefaultNav,"0")

End Sub

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...