GetModifiedDocumentsWithOptions (NotesDatabase - LotusScript®)

Lets you retrieve all modified documents meeting matches for specified options.

Defined in

NotesDatabase

Syntax

Set NotesNoteCollection = NotesDatabase .GetModifiedDocumentsWithOptions( Modifiedsince , Modifieduntil , Options)

Parameters

Modifiedsince

NotesDateTime. The time since the document was modified.

Modifieduntil

NotesDateTime. The time until the document is modified.

Options

Integer. Indicates the match options for the return result. These options include the following:
DBGETMOD_NEW_AND_DEL_NOTES(1)
DBGETMOD_NEW_ONLY(4)
DBGETMOD_DELETED_ONLY(8)
DBGETMOD_NO_SOFT_DELETES(10)
DBGETMOD_NODELETED_BIT(128)

Return value

NotesNoteCollection

A collection of documents (NotesNoteCollection) which include all matching options.

Language cross-reference

getModifiedDocumentsWithOptions method in Java Database class.

getModifiedDocumentsWithOptions method in JavaScript NotesDatabase class.

Example

The following example shows one way to use this method:

Sub Initialize
	Dim s As New NotesSession
	Dim db As NotesDatabase
	Dim nc As NotesNoteCollection
	Dim SinceTime As New NotesDateTime("1970-01-01")
	Dim UntilTime As NotesDateTime
	Dim doc As NotesDocument
	Dim noteid,nextid As String
	Dim subj As Variant
	Dim i As integer
	
	Set db = s.Currentdatabase
	Set UntilTime = db.Lastmodified
	Set nc = db.Getmodifieddocumentswithoptions(SinceTime,
		 UntilTime, DBGETMOD_DELETED_ONLY)
	
	noteid = nc.Getfirstnoteid()
	For i = 1 To nc.Count
		nextid = nc.GetNextNoteId(noteid)
		Set doc = db.GetDocumentByID(noteid)
		subj = doc.GetItemValue("Subject")
		Print "Note ID: "+noteid+" Subject: "+subj(0)
		noteid = nextid
	Next
	
End Sub