Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script trigger validation and scripted navigation

Featured Replies

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...

How about if you put a "Commit Record" at the start of the Nav?

  • Author

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

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)?

  • Author

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...

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.