Copy link to clipboard
Copied
I'm attempting to nest an if statement to display a validation alert and a secondary informational alert which works fine, but continually pops-up with each field calculation if true. I'm now trying to incorporate the oCheckbox parameter after reading THIS article; however, although it displays properly and though my hideWarning variable is accurately resetting to "true" once the oCheckbox is checked, it does not stop popping-up. Any ideas what I'm doing incorrectly? Any assistance is very much appreciated!
Here's a simplified version of what I'm attempting:
app.alert("Value must be greater than 10",1,0); // Validation alert
var hideWarning = false; // initialization
// Display Alert if hideWarning is false
if(hideWarning == false) { // Test to see if variable hideWarning is false
var oCk = {bInitialValue:false, bAfterValue:true}; // Set checkbox state
// Secondary Alert that I'd like to hide if the user checks the don't show box
app.alert({cMsg:"This is a message",nIcon:1,nType:0,cTitle:"This is a message title",oCheckbox:oCk});
// Set hideWarning state for next calculation
hideWarning = oCk.bAfterValue;
}
}
Remove the line:
var hideWarning = false;
Put this line at document level.
Copy link to clipboard
Copied
Remove the line:
var hideWarning = false;
Put this line at document level.
Copy link to clipboard
Copied
That did it! Thank you sir!