Authors, Names and Readers fields have choices formula of "Use Access Control List for choices". But this only works in Notes Client. Now, here's how to use this feature in the Web using Lotus Script. All you have to do is to call the agent in the WebQueryOpen event of the form. This tip is useful especially if you want to set a readers or authors field based on the ACL of a database.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
In the form that has the field named fieldACLEntries, it can be a checkbox, combo box, Listbox, and setting for choices for the field must be Use Formula for choices and the formula must be the name of the field itself. You can also use @Name([CN];fieldACLEntries) in the formula of the field to get only the canonical name of the Entries.
Dim session as New NotesSession Dim db as NotesDatabase Set db=session.currentdatabase Dim acl as NotesACL Dim Entry as NotesACLEntry Set acl=db.ACL Set Entry=acl.GetFirstEntry ctr=0 Dim aclentries as variant Redim aclentries(0) While Not(Entry Is Nothing) If (Entry.IsPerson) Then If (ctr<>0) Then Redim Preserve aclentries(Ubound (aclentries)+1) End If aclentries(ctr)=Entry.name ctr=ctr+1 End If Set Entry=acl.GetNextEntry(Entry) Wend Dim doc as NotesDocument Set doc=session.documentcontext doc.fieldACLEntries=aclentries