Domino Code Fragment
Code Name* Using a dialog box allow a manager to assign roles to a readers field on the fly to various documents | Date* 04/28/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.18.224.214.215 | |
Description* This code allows a db Manager to assign various roles on the fly to a readers field on the document. The roles are called from a (GetRoles) form that is used as a dialog box to allow th euser to select various roles in the ACL. | Type* LotusScript | Categories* (Misc) |
Implementation: | Required Client: | Server: |
Limitations: | Comments: You need a form call (GetRoles) that has two fields. In the PostOpen of this form we have the following code to read the Roles in the db ACL Sub Postopen(Source As Notesuidocument) Dim session As New NotesSession Dim db As NotesDatabase Dim sRoles As Variant Dim acl As NotesACL Dim item As NotesItem Dim doc As NotesDocument Set doc = Source.Document Set db = session.CurrentDatabase Set item = doc.GetFirstItem( "GetRoles" ) item.values = "" Set acl = db.ACL Call item.AppendToTextList( acl.Roles ) Call Source.RefreshHideFormulas Call Source.Refresh End Sub Field one is GetRoles and is a text multivalue field computed to @Trim(@Replace(GetRoles; "[Managers]"; "")) In the above we disallow the user from asigning the [Managers] Role. Field two is Readers and is a multivalue keyword field that calls the GetRoles field. |