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

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

Recommended Posts

Posted

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

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.

Posted

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

This topic is 7130 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.