Document Selection in Agent

I am trying to write a scheduled agent and was wondering if there is a way to select documents from a particular view only?

Thanks, Paul

Subject: Just use GetView method of NotesView class

Hi, Paul. Just declare a view object of the Notesview class and then get a handle to the view using the GetView method. Your code might look something like the following:

Dim session as New NotesSession

Dim mydb as Notesdatabase

Dim myview As NotesView

Set mydb = session.CurrentDatabase

Set myview = mydb.GetView( “” )

'from here you can use getFirstDocument method

'and then a While loop to cycle through each

'doc in the view

Subject: Forgot to mention…

Thanks Dave, Sorry but I forgot to mention that I need to do this in formula language… I don’t know script. Is this still possible?

Thanks, Paul

Subject: Yes there is

Hi, Paul. There are different ways of doing this I would imagine but one is to use the Document Selection simple search Add Condition option that is part of a formula agent. Simply add a condition of “In Folder” then specify your view. I know it is confusing that the condition says In Folder but it will work with views as well.