Examples: Subtract method (NotesViewEntryCollection - LotusScript®)

The following examples use these collections. The NotesViewEntryCollection collection1 contains documents numbered 104565, 135486, 224593, 448790, 542841, 667201, 734922, and 803469. The NotesViewEntryCollection collection2 contains documents numbered 104565, 222222, 224593, 444444, 542841, 666666, 734922, and 888888. The NotesViewEntryCollection collection3 contains documents numbered 104565, 111111, 222222, 448790, 555555, 666666, 734922, and 888888.

 

1. This example returns a collection with documents numbering 135486, 448790, 667201 and 803469.

Call collection1.Subtract(collection2)

2. This example returns a collection with documents numbering 135486, 224593, 542841, 667201 and 803469.

Call collection1.Subtract(collection3)

3. This example returns a collection with documents numbering 224593, 444444, and 542841.

Call collection2.Subtract(collection3)

4. This example returns a collection with documents numbering 135486, 667201 and 803469.

Call collection1.Subtract(collection2)
Call collection1.Subtract(collection3)

5. This example returns a collection with documents numbering 111111, 448790, 555555.

Call collection3.Subtract(collection2)
Call collection3.Subtract(collection1)

6. This example returns a collection with documents numbering 104565, 135486, 224593, 542841, 667201, 734922, and 803469.

Call collection3.Subtract(collection2)
Call collection1.Subtract(collection3)

7. This example also returns a collection with documents numbering 104565, 135486, 224593, 542841, 667201, 734922, and 803469 AND preserves view order if/when the entries are processed later.


Call collection3.Subtrace(collection2, true)
Call collection1.Subtract(collection3, true)