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

Running validation before the 'save as' script

Avatar

Level 2

Hi

I'm looking for a steer on how to run form validation before implementing the 'Save as' script - is this even possible??

Basically I want the save as script to run in the click event of my newly formed save button only if the validation script returns a positive value i.e. all mandatory fields are completed, I've used the script below:

if

(form1.execValidate()== "false")

{

app.execMenuItem("SaveAs");

}

Any chance someone could point me in the right direction or am I barking up the wrong tree?

Thanks

1 Reply

Avatar

Level 2

got it to work: my script was wrong, it now looks like this:

if

(form1.execValidate()== true)

{

app.execMenuItem("SaveAs");

}