Get Next Document

Hi Guys, can someone give me the equivalent of this Lotus Script ( see below ) in @Command languange.

Note:

Doc is a NotesDocument

View is a NotesView

Set doc = view.getfirstdocument

Do WHile Not doc is nothing

Messagebox doc.FirstName(0)

Set doc = view.getNextDocument ( doc )

Loop

I have some tricky application wherein I cannot use Lotus Script. I tried to used the

@DoWhile(

@Prompt([OK];“”;FirstName);

@Command([NavNext]);

repeat:=repeat+1;

repeat<=maxrepeat;

)

Note:

maxrepeat is an integer variable

repeat is an integer variable

But it seemed it is not working as expected. It only prompts the value of the document I selected when I run the agent, not the documents in the loop. So please give me the equivalent command of the script I mentioned Thanks

Subject: @formula

Hi densedy,

I have some tricky application wherein I cannot use Lotus Script.

Why is that? Maybe its easier to convert your appl. to Lotus Script, because @Formulas get evaluated on each document, which is not what you want.

can someone give me the equivalent of this Lotus Script ( see below ) in @Command languange.

it’s a matter of minutes to try out (-:

an action button with this formula shows up “maxrepeat”-times!

maxrepeat:=4;

repeat:=0;

@DoWhile(

@Prompt([Ok];@Text(repeat)+@Text(maxrepeat);Subject);

repeat:=repeat+1;

repeat<=maxrepeat);

You wrote:

repeat<=maxrepeat;

)

which leaves the condition empty because of the :wink: at the end!

an agent that runs on “selected documents” shows up “maxrepeat” * #selected docs times counting 0 to maxrepeat for every document.

perhaps @dbcolumn() works better for your problem?!

hth

Regards