Adding ToolsRunMacro to my button is changing the behavior

Hi There,

I have a Frameset using “NotesView” and “NotesPreview” frames. I have a button on the document in the “NotesPreview” frame with the following code:

@SetTargetFrame(“NotesView”);

@Command([OpenView] ; @Subset(@ViewTitle;1));

@Command([ViewExpandAll]);

@Command([NavigateNext])

This effectively moves focus in the view to the next document, and changes to that document in the “NotesPreview” frame.

Now when I add:

@Command([ToolsRunMacro] ; “ReleaseAndBatch”);

as the first line of the formula, the document in the “NotesPreview” frame changes to the next document correctly, but the view no longer changes focus to the next record. Any ideas? Do I need to post my agent code?

Thanks in advance,

Scott

Subject: Adding ToolsRunMacro to my button is changing the behavior…

ToolsRunMacro is always executed after other @Commands.

quick workaround: put other formulas in a separate agent and call both by ToolsRunMacro - so you can define execution order.

i hope this way you don’t loose ui-context, but it should work…

Markus Seitz

markus.seitz@icodex.com

Subject: RE: Adding ToolsRunMacro to my button is changing the behavior…

That did it! Thanks for the tip

Regards,

Scott

Subject: RE: Adding ToolsRunMacro to my button is changing the behavior…

@Command([RunAgent]) runs immediately.

Subject: RE: Adding ToolsRunMacro to my button is changing the behavior…

i’m always amazed that there are still some (basic) things i have never noticed:)

after working for years with notes i found out just some months ago i can open dbs from replicator-page by double-clicking entries…

Markus Seitz

markus.seitz@icodex.com

Subject: Adding ToolsRunMacro to my button is changing the behavior…

Not sure, but you could try using @UpdateFormulaContext after the @Command([OpenView]…) and see if that would fix it.