1
votes

I create agent which replace field "NAME" text to "text is replaced". This agent is run in "Profile" form. I write this agent with simple action. My question is how to add this agent to form action bar ?

2
Call agent with @Command([RunAgent]; "agentName")Knut Herrmann
What is your intent? Do you want to change the value of the NAME field in the current document? Do you want to change the vaue of the NAME field in all documents?Richard Schwartz

2 Answers

2
votes

It usually is no good idea to use simple action agents. The code is clearer and better readable, if you use formula- agents instead. If you are not able to write a formula agent, then: Stop working with the designer as you might mess up everything and cannot repair it.

The formula for setting a field in a document (or all selected documents, depends on the target of the agent) is:

FIELD NAME := "text is replaced"

This agent will replace the item with name "NAME" in all selected documents with "text is replaced"

To call the agent from a view action or a form action or from wherever, you again need Formula (as stated in the comment by Knut):

@Command([RunAgent]; "agentName")

Knowing the formula language is the minimum you need to know as a IBM Notes / Domino Developer.

0
votes

You can use many object handling using Lotus Script. So, I suggest using LS instead of Formula or simple action especially when you're making complicated functions or building huge application.