Agents (NotesDatabase - LotusScript®)

Read-only. All of the agents in a database.

Defined in


Data type

Array of NotesAgent objects


To get: notesAgentArray = notesDatabase .Agents


Each element in the array is a NotesAgent object. If the script runs on the workstation, the array includes shared agents and private agents that belong to the current user. If the script runs on a server, the array includes only shared agents.

To set the value of an individual NotesAgent object, you need to access the array elements individually. For example, to get the first element in the array returned from the NotesDatabase object db, you could do the following:

Dim agent as NotesAgent
Set agent = db.Agents( 0 )

The database must be open to use this property.

To test whether the database contains agents, use IsEmpty or IsArray functions, as shown in the examples.