Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Stopping a Script under given conditions??


Level 2

I am using the signature block with a Yes and No question message in the "PreSign" as follow:

var nButton = app.alert({ 

cMsg: "Warning: This step finalizes your report. You will no longer be able to edit it. \n\nDo you want to continue?", 


nIcon: 1, nType: 2 


if(nButton == 4)

{// A yes Response

  // Code for doing the thing you do on a yes

  console.println("The Response Was Yes");


else if(nButton == 3)

{ // No Response

   console.println("The Response Was somthing other than Yes: " + nRtn);


I was hoping to get the script to stop going to the signature block (or any further) if the user chooses "No"??

If you are wondering , I am planning to turn the report "ReadOnly" in the "Click" event. Not using the lock option of the Signature block because it makes the file too big for my purposes (ie: almost double the size of the file)

Any help would be much appreciated.

0 Replies