Hi,
I have a view, VIEW1 which shows documents created using Form1…Formn, I want create a new field, FIELD1 in all the existing documents in that view1.
Any idea how can I achieve it using lotus script?
Thanks
MS
Hi,
I have a view, VIEW1 which shows documents created using Form1…Formn, I want create a new field, FIELD1 in all the existing documents in that view1.
Any idea how can I achieve it using lotus script?
Thanks
MS
Subject: Create new field in existing documents
Something along the lines of this:
dim s as new notessession
dim db as notesdatabase
dim v as notesview
dim doc as notesdocument
set db = s.CurrentDatabase
set v = db.GetView(“VIEW1”)
set doc = v.GetFirstDocument
do while not (doc is nothing)
doc.FIELD1 = “myvalue”
call doc.Save(true, false)
set doc = v.GetNextDocument(doc)
loop
and that should do it!
It would be easier using formula language though.
Subject: Create new field in existing documents
Don’t know how much you know about Notes.But here is a solution :
Create agent that can be run from the Actions list on selected documents.
select formula in the agent code and put this into the code part.
Field Field1:=“Fieldvalue”
If you need a Lotus script…try finding a example script from the help ( there are plenty there)
Notes documents are like records in RDBMS and form is used only as a Document data display template. It doesn’t matter what form you used to create a document, you can add fields to any document.
HTH
Subject: Create new field in existing documents
Hi,
if the value of FIELD1 shall be the same for all documents in that view, then you could do it like this:
Dim view as NotesView
Set view=getyournotesviewsomehow
Call view.AllEntries.StampAll(“FIELD1”, theValue)
Best regards
Mario Varchmin
http://www.e-llennium.com/e-llennium/index_en.htm
Subject: RE: Create new field in existing documents
Thanks to you all. I will work on this solutions.
MS