What I am trying to do is determine if the user belongs to a group and then hide a button if they do. right now I have this code in my open query:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New NotesSession
Set db = session.CurrentDatabase
Set doc = db.CreateDocument
isManager = Evaluate(|@IsMember(@UserName; @ExpandNameList("MSTPTOR01DS/SVR/MasterPrec":"names.nsf";"MP_Managers")|, doc)
result = isManager(0)
End Sub
At the end of this result is 1 if the user belongs to the MP_Manager group.
Now in the Hide when part of the button I try to use result but that fails. I have declared result as String in a script library and in the Globals declaration of the form I am using the script library. The problem now is using result in a formula.
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New NotesSession
Set db = session.CurrentDatabase
Set doc = db.CreateDocument
isManager = Evaluate(|@IsMember(@UserName; @ExpandNameList("MSTPTOR01DS/SVR/MasterPrec":"names.nsf";"MP_Managers")|, doc)
result = isManager(0)
End Sub
At the end of this result is 1 if the user belongs to the MP_Manager group.
Now in the Hide when part of the button I try to use result but that fails. I have declared result as String in a script library and in the Globals declaration of the form I am using the script library. The problem now is using result in a formula.