Readers-type fields not doijng what I'd expect ON WEB

Hi all - I hope you're all keeping well!

Due to a view taking too long to load on the web (possibly due to SELECTION formula which is not exactly all that heavy) I've decided to add a Readers-type field to my main document. That readers field returns a name or list of names in Canonicalized format. It also returns 1 role as an element of the list of readers.

Now, when I force values into the readers-type field while working in the Notes database, the view acts as I expect. However this activity is not reflected on the Web.

Obviously if I create a document on the web the readers-type field automatically generates the list of names who can read it. However I noticed that by changing the readers field values via a simple agent in Notes that the only common factor that maintains a records visibility on the web is the ROLE that is in the list. Worse again, the user logged into the web does not have that role as either a single person or Group Member on the ACL.

I'm very confused now. The Group to which the logged-in user belongs has Manager access in the ACL so should be able at the very least see their records in the view as their name is included in the Readers field. The view has a very simple selection formula so that can't be the issue.
Can the Web identify the logged-in user against the readers fields? I don't see anything in Domino help to suggest not.
I'm sure it must also be ok to call the Readers-type field anything I want or must I call it "Readers"?

I'm grasping at straws again as the obvious isn't working for me. You're help would be greatly appreciated people!! Thanks in advance, noloco.
Who is Participating?
zvonkoConnect With a Mentor Commented:
I could bite JM for this >:Z

Hey, there is never a relation for the points. The main criteria is the fun factor :)

Ok, I have a big advantage for you if your Domino is R5: use single category views!
If you need support on this say it.
With single category views is the whole nonsense with personalized views obsolete :)

To see what your views are doing in your database go to Domino console and look for the response of this command:
> show database names.nsf
myDoman's Address Book
Document Type                            Live         Deleted
    Documents                            19.190       13.131      
    Info                                 1            0          
    Form                                 80           0          
    View                                 66           0          
    Icon                                 1            0          
    Design                               1            0          
    ACL                                  1            0          
    Help Index                           0            0          
    Help                                 1            0          
    Macro                                14           0          
    Shared Field                         6            0          
    Repl. Formula                        0            0          
    Private Design                       0            0          
    Unknown                              0            0          
View sizes                               Bytes
    Groups                               7.872.856
    Locations                            0
    People\Alternate Language Information  0
    People                               1.473.072
    Server\Certificates                  76.584
    Server\Clusters                      0
    Server\Configurations                10.448
    Server\Connections                   11.472
    Server\Deny Access Groups            0
    Server\Domains                       10.448
and so on…

I mean instead names.nsf you put your database file name.

So long,

Hello noloco,

this is the really big pitfall this Readers fields. If you are not contained as Role, Group or CommonName in one of the Readers fields and if not all of them are empty, then you can never again get this document; not even as a Manager. That is fact.

Beside this do the Reader fields slow down view display time on the web. On Notes client you get at first access the view index according to your Reader rights transferred to your local desktop cache. On web this index hast to be built again and again at every category expand or collapse.

Your main question as I understood is: what Name should your adjust agent put into field of type Readers?

My answer is this: place on the form a ComputedForDisplay field with this formula: @UserNamesList
And there are all strings you can use as member to be recognized in Readers fields. It can be a Role, Group, CommonName, Hierarchical, Abbreviated, ShortName and so on...

And of course you can have more then one field with names chosen by you of type Readers. The rule is: as long as all Readers fields are empty everyone with at least Reader access to the database can see this document. As soon as one of the Readers fields is not empty, then you have to be in at least one of the Readers fields to even see the document; in spite you have Manager access to the database.

I hope not to confused things too much for you.


Hi Bro!
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Hi :)
nolocoAuthor Commented:
Ok, well I've actually been working away at this in the meantime and progressed a fair bit without checking your answers until now. (And many thanks for the help so far zvonko). Where I am right now is that I can set the readers field value to what I want and it is effective - however the readers field is new to the form and I am trying to update all older documents of the same form, but the agent (below) does not set the readers field to a READ-ACCESS NAMES field, just a plain text-list. If I went into each of the old records and saved them on the web and then ran the agent everything would work - but there are 7000 of those so that's not where I want to go.

The agent below should change the following statistics on the readers field in documentX FROM THESE:
Field Name: ReadersARE
Data Type: Text List
Data Length: 94 bytes
Seq Num: 11
Dup Item ID: 0
Field Flags: SUMMARY

"Mickey Mouse"
"Daffy Duck"
"Scooby Doo"

     TO THESE:

Field Name: ReadersARE
Data Type: Text List
Data Length: 111 bytes
Seq Num: 1
Dup Item ID: 0

"Mickey Mouse"
"Daffy Duck"
"Scooby Doo"
- notice the only difference is the Field Flags: SUMMARY READ-ACCESS NAMES change.

Here's the agent that does not make that change:
(It's run manually from Actions menu and on Selected docs):
FIELD ReadersARE:=ReadersARE;
V:="[ORMManager];Mickey Mouse;Daffy Duck; Scooby Doo";
FIELD ReadersARE := @Explode(V;";"); SELECT @All

I've also tried adding a
@Command([ViewRefreshFields]) but neither of these could force the field to be recognised as a READ-ACCESS NAMES field.

I can see no flaw in the agent - anyone know how I can force this change to the field without having to open and save 7000 docs on the web?!

Many thanks in advance again,
Use instead of upper @Formula this LotusScript agent doing the same:
Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim dc As NotesDocumentCollection
  Dim doc As NotesDocument
  Dim ReadersARE As NotesItem
  Dim myReaders(0 To 4) As String
  Set db = session.CurrentDatabase
  Set dc = db.UnprocessedDocuments
  Set doc = dc.GetFirstDocument
  myReaders(0) = "Administrators"
  myReaders(1) = "[ORMManager]"
  myReaders(2) = "Mickey Mouse"
  myReaders(3) = "Daffy Duck"
  myReaders(4) = "Scooby Doo"
  While Not (doc Is Nothing)
    Set ReadersARE = doc.AppendItemValue("ReadersARE", myReaders)
    ReadersARE.IsReaders = True
    Call doc.Save(True, False)
    Set doc = dc.GetNextDocument(doc)
End Sub

Good luck,

Jean Marie GeeraertsApplication EngineerCommented:
This was too easy for 235 points :-)
Long time no see, noloco. How are you?
Hey JM! Do you remember this offered three times 500 points you spoiled to me with upper comments?

I need 20,000 to get Arun mad :-)

Jean Marie GeeraertsApplication EngineerCommented:
Oh yeah, maybe you can get noloco to increase points, just to tease Arun :-)
Thank you that you proposed this. I was ashamed doing so :)

Grr Grr....Grrrrrr !!!

I will call moondancer and block your expert pts at 99975 !!!  Hobout that ?

Yea, yea, call Mooney :))

nolocoAuthor Commented:
Ok people, calm down now, we're all responsible mature adults. HyyyAAAHHH-AZZIFF!!
Anyway - thanks for the code zvonko - that worked like a charm of course, but as you said originally the view does take longer to reload than it did without using the readers field. MUCH LONGER!
My original need for this question in the first place was to reduce loading time for a view on the web. The view selection formula basically checked the value of about 8 fields and was taking an average of 25 seconds to load under 1 particular user. Someone was brought in here to suggest a way of speeding things up and went down the readers field road. He left that road it hangin, and I had to continue it and hence all this relay started.
So, as someone suggested above, the points were a little top-heavy for this. Unfortunately without actually giving a copy of my database it wud b impossible for someone to suggest how I might speed it all up.
It's a normal notes view, there about 7000 docs in the system averaging about 3500 bytes each. However the database is about 1300 MEGS!!!! I assume this is coz there appears to be about - OH MY GOD!!!! - I just checked it - 120 VIEWS in the thing!!! That's gotta hurt. Who's been working on it!!!??? Wooooweeee.
Some1 tell me - I'm no fan of the Admin side - but I reckon if I remove 100 of those views from the design - life should be faster in the database on the web?
Do I have to so any compressing of the database or index rebuilding or stuff after just deleting views from the design? (Of course I'll check if all views are referenced anywhere).
zvonko - will you answer that and I'll hand ya the points so and put this little conversation to rest.
As always many thanks pals!
p.s. I'm fantab jerrith - and you?
nolocoAuthor Commented:
Ooops sorry - hang on - apparently this guy wanted to use the readers field as there was an unreproducable bug in the application on the web where certain users could see documents which they should not have. The documents all contain about 8 fields containing user names who should be able to view the document. The view in question checks has the following selection formula:

SELECT (Form = "Loss2") & (ForDeletion!="YES") & (  (Authorname=CurntUserA) | @Contains(ApprovalLevel1; CurntUserA) | @Contains(ApprovalLevel2; CurntUserA) | @Contains(ApprovalLevel3; CurntUserA) | @Contains(ApprovalLevel4; CurntUserA) | @Contains(ApprovalLevel5; CurntUserA) | @Contains(ApprovalLevel6; CurntUserA) | @Contains(ApprovalLevel7; CurntUserA) )

I think you get the gist of what it's trying to do. However from time to time different users get to see documents which are outside of these criteria. On refresh or revisit to the view all seems to return to normal but it has happened a few users and continues to do so at random.
Anyone have any ideas why that might be? If someone hits this on the head and it's not zvonko I'll give zvonko his points for assistance up unitl now and open this question as a separate one and hand out the points for that one separately.

Thanks y'all inadvance,
ohh, your question with deleted views and compact...

Deleted is deleted is gone. Full stop.

Look at it like this: at every access to a view has the index to be built by the user if not up to date. Usually this view building is taking time and user has to wait that his update finish. To speed up this refreshment time are server indexer task there. That is all. If no views then no update. Of course does a compact speed up indexing. I can bet your database shrink to a third after view deletion and compact. And this db size influence indexer. My observation is that first slow down is at seven gigs.

Jean Marie GeeraertsApplication EngineerCommented:
Good idea that "show single category" option Zvo.
I use that quite a lot to limit what users see in my applications. Surely makes life a lot easier.

Sorry about the ramble, but we tend to tease each other a bit from time to time.
And every teaser has to know what is good for the community. That's the measure :-)

nolocoAuthor Commented:
Thanks for the help y'all. I'm gonna look into the single category views as I'm on R5.05 and will get back to ye.
Tlak then.
ZvonkoSystems architectCommented:
No comment has been added to this question in more than 714 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

RECOMMENDATION: Award points to zvonko http:#7099389

Any objections should be posted here in the next  4  days. After that time, the question will be closed.

EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.