I am trying to find a way to filter the devices view, or more precisely a copy of the devices view, in the LotusTraveler.nsf so that it only shows those users with three or more devices registered with the server. I am using stand-alone servers so I do not have the same SQL tools that could be used to construct a query to do this. I am having to rely on Notes and Domino facilities for this. I am also not a developer so I am not that well versed in view selection formulas.
You will need to create a agent that ( can be a scheduled agent )
Goes to each doc and set a new field on the doc let say field name is DispOver =“0” if not already that value.
Then loop thru a view or collection and if the DispOver =“0” then do a lookup by a view on sorted by name (GetAllDocumentsByKey method) and if the collection is over 3 then set the DispOver field to “1” for each of those docs
Create a copy of the device name view and in the selection formula add & DispOver =“1”
If devices are keyed to users, loop through whatever your user list is, build a doc collection by user, look at the dc.count, and if it’s > your limit, set a ‘yep, more than 3 devices for this user’ flag in either the device records if you want to see them or some other tracking doc created and managed by the agent. You’ll need to unset this flag/delete the tracking doc if the count goes below your limit.
I’d recommend using a profile doc to set the limit because it’s 3 today and 4 tomorrow and 2 next week as ‘those who care’ change their minds about what you want to track. By using a profile doc, you don’t have to change your agent to change the limit.