Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5541 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

I've setup some field validation using script triggers and it works well. My script has an Exit Script Result: 0 step to prevent the user from leaving the field if the data fails validation.

My solution, like many, also makes use of scripted navigation and that's where the problems start.

If the user modifies one of those fields and then hits a navigation button the navigation script is triggered first. Then, upon reaching a script step that takes the focus away from the field, the field validation script gets triggered, the validation fails with an Exit Script Result: 0 and the focus remains on the field, but the navigation script keeps going... so I get a bunch of error messages since the script assumes you have left the field/layout, which in fact did not happen.

I can't have both an Halt Script step (to halt all running navigation scripts) AND an Exit Script Result: 0 (to prevent the fiels from being exited)...

So how do I run a scrip trigger field validation script that can halt running scripts AND return a False for the field navigation ?

It seems I shouldn't be the only one having this problem but I couldn't find anything about it anywhere, it must be really obvious that no one has had to post about it...

Thanks for pointing me in the right direction.

  • 2 weeks later...
Posted

Hello,

Thanks for replying.

The "Commit Record" step would trigger the validation script on the field but the problem remains: if the validation fails then the record cannot be committed (can't navigate to another layout) yet the nav script keeps going assuming the layout has been changed...

Thanks for the help though, short of modifying all my nav scripts I'm still at a loss as to how to solve this one...

Cheers

Posted

What is you put a If (GetScriptResult) = 0, Halt, at the top of the nav script? Since your validation script has an Exit Script (Result; 0)?

Posted

I would have to add that at the top of ALL the scripts that commit the records, there are a lot.

So far it's the only solution I see though...

Posted

I've accomplished this in the past by creating a "before nav" script that I call at the top of all my nav scripts. In the before nav script, I deal with all the dirty work logic, and call a halt if necessary. It's an ugly solution, but AFAIK there isn't a better option in FileMaker.

This topic is 5541 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.