Morning all, I have a view containing several hundred documents. Does anybody know of an easy way to select a number of these and change the value in a field ? Ideally I would like to give the user the option to be prompted for a value to change this field to.
Thanks in advance !
Subject: Change field values from view
Hi,
Put that some kind of LS code to your view action:
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim askme As Variant
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
askme = ws.Prompt (PROMPT_OKCANCELEDIT, "We want to hear from you!", "Enter your message here.")
If Not Isempty (askme) Then
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
doc.FieldName = askme
Call doc.Save( False, True )
Set doc = collection.GetNextDocument(doc)
Wend
End If
Konrad
Subject: RE: Change field values from view
That did exactly what I wanted. Thankyou Konrad !
Subject: RE: Change field values from view
I Have employee id and employee global id per each document, now the client wants to change based on employee id we need to change employee global id…The global id contains in the csv file, which is sent by client.
Now the requirement is based on my employee id I need to set (or) replace Employee global id for each document.can you please provide me the code…pls