Hi guys, this one's driving me nuts! We have a load of databases which we bought from an external company (called IntraWare/GlobalWare, anybody heard of them?) which are full of hidden script libraries, which makes this sort of thing difficult!
We recently decided we didn't like the date format as it appeared in the view of our customers database, and they sent us an update (which was also a compiled-and-hidden LS library) which works nice. The problem is that it only works on NEW documents! Opening an old document, editing it and saving it corrects the problem, but there are thousands, and I don't want to do it manually, so I wrote an agent.
Bear in mind that I don't know how the "ASubject" parameter (the value which appears in the view) is calculated, because as I said, everything's hidden. Here's my agent:
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
While Not doc Is Nothing
Call doc.Save(False, False)
Set doc = dc.GetNextDocument(doc)
Wend
End Sub
Anybody got any idea why this won't work? The agent runs on selected documents and I've been running it on a single one to test, and I get no error messages or anything, so why isn't it recalculating the value?
The "Asubject" value is NOT a field within the form, but IS a field within the Document Properties box, and I don't fully understand this myself. Any help here would be very much appreciated.
We recently decided we didn't like the date format as it appeared in the view of our customers database, and they sent us an update (which was also a compiled-and-hidden LS library) which works nice. The problem is that it only works on NEW documents! Opening an old document, editing it and saving it corrects the problem, but there are thousands, and I don't want to do it manually, so I wrote an agent.
Bear in mind that I don't know how the "ASubject" parameter (the value which appears in the view) is calculated, because as I said, everything's hidden. Here's my agent:
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
While Not doc Is Nothing
Call doc.Save(False, False)
Set doc = dc.GetNextDocument(doc)
Wend
End Sub
Anybody got any idea why this won't work? The agent runs on selected documents and I've been running it on a single one to test, and I get no error messages or anything, so why isn't it recalculating the value?
The "Asubject" value is NOT a field within the form, but IS a field within the Document Properties box, and I don't fully understand this myself. Any help here would be very much appreciated.