Running an agent from another agent

Hello.I have a formula agent that updates some documents in a database.

The Runtime is ‘Action menu selection’

the target is ‘All documents in view’

and the Document selection is a ‘By Form’ condition

Now the problem is that some fields have been added on the form…and old docs do not have these fields.

For these new fields to appear on the old docs, I must do a ComputeWithForm…in lotusscript.

I was thinking of creating a new lotusscript agent that just does a computewithform with the old docs but I cannot run it from the existing formula agent. (the target must be ‘None’ to allow @commands)

Does anybody have any idea on how to proceed please?

I also tried running the formula agent from the lotusscript one but I get an “Unsupported trigger” error message

Subject: running an agent from another agent

If it is just refreshing the old documents for it to reflect new fields then you can use @Command( [ToolsRefreshSelectedDocs] ) . I think it triggers validations and computes all fields once again. So, documents which have erroneous data might not recalculate.

Subject: RE: running an agent from another agent

All right…the good news is that the document is being updated i.e. the new fields are added.The bad news is that only the first doc is being updated. I then get an error msg: “Someone else modified this document at the same time”

and it stops here.

I tried both of your codes…

I tried to put the code at the beginning of the agent, then at the bottom but I still get the error.

Subject: running an agent from another agent

hi,

For the new fields to appear in the old documents, do the following :

  1. Change the target of your agent to “None”.

  2. Add the following code in your agent :

    @Command([EditDocument]);

    @Command([FileSave]);

    @Command([FileCloseWindow]);

    SELECT Form=“Form Name”

Try it.

Regards,

Dipen

Subject: running an agent from another agent

Thanks a lot.We finally made it work.