Erick_BECUWE
asked on
Adding members to a specific group, from a NAB view
Hi there
Is there a way, by the means of an action button designed in a specific NAB view, to add the username of a selected People's document, as a member of a specific Group (that group is already in the NAB) ?
ie: i open my NAB, i go to my custom view, select a few people documents, click on an action button, and select a group to add these users to.
thanks
Is there a way, by the means of an action button designed in a specific NAB view, to add the username of a selected People's document, as a member of a specific Group (that group is already in the NAB) ?
ie: i open my NAB, i go to my custom view, select a few people documents, click on an action button, and select a group to add these users to.
thanks
ASKER
Any idea about a script i could use ?
I've done this from the uiworkspace on a view:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim uiview As NotesUIView
Dim col As NotesDocumentCollection
Dim doc As NotesDocument
Dim msgPrompt As Variant
Set db = session.CurrentDatabase
Set uiview = workspace.CurrentView
Set col = db.UnprocessedDocuments
Set doc = col.GetFirstDocument
msgPrompt = workspace.Prompt( PROMPT_OKCANCELEDIT, "Type Chapter/Section", _
"Enter the Chapter/Section Title for the selected documents." )
If Not Isempty( msgPrompt ) Then
While Not(doc Is Nothing)
doc.Chapter = Cstr(msgPrompt)
Call doc.Save( True, False )
Set doc = col.GetNextDocument(doc)
Wend
Call uiview.DeselectAll
Call workspace.ViewRefresh
End If
With the above code, you select documents in the view, click the action button and then type in the value to populate "Chapter" field on the documents. You could even do a lookup to the groups view so the list of values in the prompt is a list of your existing groups.
Let me know if you need more help.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim uiview As NotesUIView
Dim col As NotesDocumentCollection
Dim doc As NotesDocument
Dim msgPrompt As Variant
Set db = session.CurrentDatabase
Set uiview = workspace.CurrentView
Set col = db.UnprocessedDocuments
Set doc = col.GetFirstDocument
msgPrompt = workspace.Prompt( PROMPT_OKCANCELEDIT, "Type Chapter/Section", _
"Enter the Chapter/Section Title for the selected documents." )
If Not Isempty( msgPrompt ) Then
While Not(doc Is Nothing)
doc.Chapter = Cstr(msgPrompt)
Call doc.Save( True, False )
Set doc = col.GetNextDocument(doc)
Wend
Call uiview.DeselectAll
Call workspace.ViewRefresh
End If
With the above code, you select documents in the view, click the action button and then type in the value to populate "Chapter" field on the documents. You could even do a lookup to the groups view so the list of values in the prompt is a list of your existing groups.
Let me know if you need more help.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
It can be developed, but currently there is (afaik) no such button available.