Can any one of you please help me on this?I have written the following piece of code on the action button on a form:
test := @Prompt([YesNo];“Warning Message”;“Warning! This topic has been marked as CLOSED. If you proceed, this topic will be marked as PENDING. Are you sure you want to proceed?”);
@If( test=1 ;
@Do(
@Command([EditDocument];“1”);
FIELD Status :=Status;
@SetField(“Status”;“Pending”);
@Command( [ViewRefreshFields] ) ;
@SetEnvironment(“commentest”;“0”);
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow]);
@PostedCommand([Compose]; “Comment”)
);
“”
)
However when the I select the choice of of prompt as “No”, it gives me the lotus notes error message- “Cannot execute the specified command”.
Is it incorrect to write “” in the above mentioned else condition?
Please help me, its really very urgent.
Subject: Error message in @prompt([YesNo])
I have tested you Code in a Action and in Action Button.I can not see be any problems. Its working well.
I have tested it in version 6.5 and 7.00
Are you sure that there are not any Code in the end that is not appended in this Thread.
Subject: RE: Error message in @prompt([YesNo])
Thanks IQ,But I have found the problem exsisting in the code. Please see the code written on the click of the button:
@If(
Status="Closed";
@Do(
@SetEnvironment("commentest";"1");
test := @Prompt([YesNo];"Warning Message";"Warning! This topic has been marked as CLOSED. If you proceed, this topic will be marked as PENDING. Are you sure you want to proceed?");
@If( test=1 ;
@Do(
@Command([EditDocument];"1");
FIELD Status :=Status;
@SetField("Status";"Pending");
@Command( [ViewRefreshFields] ) ;
@SetEnvironment("commentest";"0");
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow]);
@PostedCommand([Compose]; "Comment")
);
@Return(“”) %Rem{ Error line}%End Rem
)
);
@Do
(@PostedCommand([FileSave]);
@Prompt([Ok];“Staus”;“NOT CLOSED”);
@PostedCommand([FileCloseWindow]);
@PostedCommand([Compose]; “Comment”)
));
@Prompt([Ok];“OUT”;“OUT”)
The problem is that I have used the nested loop but when code encounters @Return(“”), it moves the flow of control out of the inner loop. However it is needed that the flow of control should be moved out of all the loops(i.e. outside the complete loop).
This is a generic question:-- " If there is a nested loop and we want to move out of the loop at any point or condition, is it possible? If yes, then how?
I am hoping for a favourable response from all of you.