@DbLookup geht nicht - aus der KBASE:
Published
Product Area: Notes Date: 25.04.2001
Product Release: Notes Client 4.6x, Notes Client 4.5x Document #: 155913
Category: Workstation/Desktop\\Application Development\\Macro/Agent/LotusScript
Error: "@Function is Not Valid in this Context" Calling One Agent from Another via LotusScript
Problem:
When you attempt to call one agent from another using LotusScript, the following error occurs:
"Notes Error: @Function is not valid in this context."
Solution:
This error occurs when the "called agent" contains one of the following @functions:
@Command (or an @PostedCommand)
@DbLookup
@DbColumn
@DDEInitiate
@DDETerminate
@DDEExecute
@DDEPoke
@MailSend
@Prompt
@DialogBox
@PickList
The use of these functions is reserved for the Notes workspace - where they receive either input or context from a user. If you attempt to use these functions in the background, there is no opportunity for a user to provide the input the functions require.
Supporting Information:
Two Typical Scenarios.
1. From the Notes UI, you attempt to run a LotusScript agent (Agent1) that calls an another agent (Agent2), and Agent2 contains one or more of the functions listed above. The NotesAgent class Run method runs the called agent (Agent2) in the background. (In this case, the error displays in a dialog box.)
2. A scheduled agent calls another agent, and - in the called agent - the value of a field is populated using @Prompt or @PickList. (In this case, the error displays in the field.)
Du könntest versuchen, im Exiting Event den Agenten mit
@Command([ToolsRunMacro];"Agentname")
aufzurufen.
Andreas