Expand my Community achievements bar.

Stopping a Script under given conditions??

Avatar

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?", 

cTitle: "READY FOR PUBLICATION", 

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