Hi,
I have create a radio button field and i now i want to create those options by pulling all the roles from the ACL. IS there any @formula can achieve this?
Thanks
Hi,
I have create a radio button field and i now i want to create those options by pulling all the roles from the ACL. IS there any @formula can achieve this?
Thanks
Subject: How to pull all the roles from ACL into a field?
I met another problems…
if let said, the current database has the following roles: a,b,c,d
If using your LS, “[a][b][c][d]” will appear in the allRoles field.
Then i have created another dialog list field and pull values from allRoles. I want users to be able to select those values. But it does not work as i expected. [a][b][c][d] becomes 1 option only.
Any solution?
Subject: How to pull all the roles from ACL into a field?
Have a look at @UserRoles that might help.
Good Luck
Subject: RE: How to pull all the roles from ACL into a field?
@userroles only gives you the roles for one userTo see all db roles, try this;
Add a hidden editable multivalue field called allRoles to your form, with a translation formula of;
@if(@isdocbeingsaved;“”;allRoles)
Then in the postopen and postmodechange put this script
if source.editmode then
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Set db = session.CurrentDatabase
Set acl = db.ACL
Forall r In acl.Roles
call source.fieldappendtext("allRoles",r)
End Forall
End If
I think that should do it
Subject: RE: How to pull all the roles from ACL into a field?
thanks, it works well.
But it only pull those roles from current database, is there any way that i can pull from other other database i specified?
Thanks
Subject: RE: How to pull all the roles from ACL into a field?
Well, yes, obviosulyJust change the ‘set db = session.currentdatabase’ to get the database you want