Use ACL entries for choices in Web

This tip is useful especially if you want to set a readers or authors field based on the ACL of a database.

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.

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
This was first published in October 2001

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close