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

Invoking script when user changes a record

Featured Replies

I have written a script that will validate data that a user enters into a new record. I would like to do the same validation when the user makes changes to an existing record. Is it possible to invoke a script to validate fields on a layout after a user hits enter on an existing record? or is the only way to do this type of validation via the Field rules in the database definitions?

  • 2 weeks later...

Sorry no help, just posting to say I would love to do this also.

  • Author

Eventually I found a plug-in that does this ... I have been playing with it to understand it and it appears to do what I want. The plug-in is called EventScript at http://www.softs4humans.com

I suppose you could add a "Done" Button and force users to hit it when done with a record, then run your script with it.

  • Author

Sure, but that is an extra step that my users did not want to do. That is why I was looking for an alternative.

Why not use field level validation?

One of the big problems with script validtion is that the data has to be entered into the record before the script processes it; that is, the potentially bad data is in the database, then the user gets prompted to fix it up. What if they cancel the script, exit the program, crash the computer?

With field level validation the record is not committed (saved to the database) unless the validation rules are met. The potentially bad data isn't in the database unless it's validated.

The more work I do the more paranoid I get about validation, making sure that there is NO WAY that data that breaks the business rules can get into the system. The only sure way to do this is with FileMaker's field level validation; any other method relies on interface to enforce the rules and is easy to break, because it relies on first letting the unchecked data into the system.

You should read this .

  • Author

I could not find a way to define a field validation rule that covered this situation.

The user wants to preload info into the first column of two rows of a portal. But the second row is optional. Because of that I couldn't see a way to define the validation ... the problem is entry of telephone numbers. In the Toronto area we have an area code (905) that can be either long distance or local. The user wants to have a prompt which asks whether the 905 area code is long distance ... and if so, set the country code to 1. I can do that via a script when the data is added, but if the user changes the data later I could not invoke a script.

(Does this make sense?)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.