Query results for : QuickR
QuickR - How to count the number of registered users?- 14 June 2012 - (0) Comments
Thomas Hampel14 June 2012
Lets assume an IBM QuickR environment where all users are allowed to access the Domino server that QuickR runs on.
How would an administrator report the number of users?
Using the log.nsf is not the right place, because users leave a trace there just by accessing (e.g.) the Domino directory, but not QuickR.
A better way is to use the QuickR Place Catalog (placecatalog.nsf) on your Quickr server. It's design is set to not show up in the Open Database dialog, so you either need to type in the filename or use the Admin client to open it up.
It contains a view named "Total Places By Member" which will show the total number of quickr users across all places including those with Anonymous access, all categorized by user name.
So to identify the number of QuickR users, collapse everything in this view so that you can see the first category only.
What you can see is member number and the user name
Now scroll down to the last entry in this view - the last number displayed there is the total number of unique users.
- If there are places which grant access to a group, then groups displayed in this view need to be resolve recursively
- If Anonymous access is enabled , special licensing rules apply
If anyone would like to do this automatically, here is some LotusScript code which might help.
Agent Count number of registered QuickR Users
Created Jun 14, 2012 by Thomas Hampel
A simple agent to report QuickR user names - feel free to modify
Const QuickRServer$ = "Domino-Name-Of-QuickR-Server"
Const QuickRPlaceCatalog$ = "PlaceCatalog.nsf"
Const QuickRViewName$ = "TotalPlacesByMember"
Const NABServer$ = "Domino-Name-Of-QuickR-Server"
Const NABFilename$ = "names.nsf"
Dim userlist List As boolean
Dim nab As New NotesDatabase (NABServer$, NABFilename$)
Dim PlaceCatalog As New NotesDatabase (QuickRServer$, QuickRPlaceCatalog$)
Dim view As NotesView
If Not NAB.IsOpen Then
Print "Unable to open Domino Directory : " & NABServer$ & " - " & NABFilename$
If Not PlaceCatalog.Isopen then
Print "Unable to open QuickR PlaceCatalog : " & QuickRServer$ & " - " & QuickRPlaceCatalog$
'# load all elements into list object
Set view = PlaceCatalog.getView (QuickRViewName$)
Call LoadNamesFromView (view)
'# resolve membership
'# output result
Print "Total number of unique users is " & CountUsers()
'# Anonymous access...
If IsElement (userlist ("anonymous")) Then
Print "Anonymous access to one or more places is ENABLED"
Print "Anonymous access to one or more places is DISABLED"
Function LoadNamesFromView (View As NotesView)
Dim doc As NotesDocument
Dim tDoc As NotesDocument
Dim usernameArray As variant
'# exit if the view is not valid
If view Is Nothing Then Exit Function
view.AutoUpdate = False
Set doc = view.getFirstdocument
While (Not doc Is Nothing)
Set tdoc = view.getNextDocument (doc)
If doc.isValid Then
usernameArray = Evaluate (|@Unique(@Trim(PlaceOwners : PlaceManagers : PlaceEditors : PlaceAuthors : PlaceReaders))|, doc)
ForAll u In usernameArray
'# add name to list of unique users
userlist (u)= True
usercount# = usercount + 1
Set doc = tdoc
Print "Found " & usercount# & " entries across all places."
Function expandGroupNames(GroupName As String, GroupMemberArray As Variant) As Boolean
on Error GoTo errorHandler
expandGroupNames = False
If Len(Trim$(GroupName)) = 0 Then
GoTo functionExit '# if no name is passed, don't even try to resolve the group name
'# Undocumented @Formula from http://www-304.ibm.com/support/docview.wss?uid=swg21101582
'# Input from http://www.dominoguru.com/pages/01202009030630.html
GroupMemberArray = Evaluate(|@ExpandNameList("| & NABServer$ & |":"| & NABFilename$ & |";"| & GroupName$ & |")|)
GroupMemberArray = ArrayUnique(GroupMemberArray, 5)
If UBound(GroupMemberArray) = 0 Then
'# if there's only one group member, check to see if it's valid
if StrCompare(GroupMemberArray(0), GroupName$, 5) = 0 Then
'# if the only member found is the group name itself, the group couldn't be resolved
expandGroupNames = True
MsgBox "Error " & Err & ": " & Error & " at line " & Erl & " of " & GetThreadInfo(1) & ".", , "Error encountered!"
Print "Error " & Err & ": " & Error & " at line " & Erl & " of " & GetThreadInfo(1)
Function ResolveGroupMembers As Integer
Dim GroupMemberArray As Variant
'# loop all users found
ForAll user In userlist
'# try to resolve the existing list entry
If expandGroupNames (ListTag(user), GroupMemberArray) Then
ForAll members In GroupMemberArray
'# add the new name to the list
userlist (members) = true
Function CountUsers As Long
ForAll user In userlist
count& = count + 1
Countusers = count&