Is there a way to specify the view and/or folder in the search formula when using db.search? I need to purge mail that is 90 days old or older in a user’s mail file, but I can only purge mail that is in the inbox, trash bin, and sent view. Originally, I had this formula:
searchKey$ = {@Created <= @Adjust(@Today;0;0;-90;0;0;0) } This, however, looks at all documents in a users mail file. Anyone have any suggestions.
Thanks
Subject: You can’t specify a view or folder when using db.Search
Paul,
You can’t use db.Search if you need to target specific views and folders. The beauty of db.Search is providing a means to obtain a collection of documents for which there is no view or folder that accomplishes the same thing (such as if you don’t have authority to change the design of a database containing the docs you want to access).
Look in Designer Help for NotesView and its AllEntries property and its relationship to NotesViewEntryCollection. The GetView() method of NotesDatabase accepts a view name or a folder name.
Ken