I need to be able to look up a group within the server’s names.nsf and grab its list of members. THEN, I need to add those members to an already calculated list, keeping the names unique.
what’s the name of the field you are in where you want this existing event to fire?
Upon exiting the field MyList
what field on the document is the already calculated list of names in?
MyList
What field on the document do you want your result list placed into?
MyList
In other words, if the user didn’t add certain names to this field, I want to pull them out of names.nsf and append them to what the user entered thus forcing those names into it.
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
field_list = doc.MyList
group_list = Evaluate(|@DbLookup("":"NoCache";"":"names.nsf";"Groups";"Group_TC";"Members";[FailSilent])|)
new_list = Arrayunique(Arrayappend(field_list, group_list))
Call doc.ReplaceItemValue("MyList", new_list)
Call doc.Save(True, False)
Call uidoc.Reload
The members of the group_list are returned from names.nsf with their Canonical names. Is there an easy way to get those into their common names (no CN=)? For example, instead of CN=Reuben Smith/OU=Ottawa/O=Acme/C=CA, I want Reuben Smith.
returns an array of names (I’m not sure if they are actually lotus “names” or just strings) but in their full, canonical format. I want to replace each value in group_list with
You want to use @Name, not @DbName, but I’m not saying your approach will work. You may need to loop thru each member of the array and use the CreateName method to convert it to a true name then extract the common name property then add it to a new array existing of only common names.