1 Reply Latest reply on Nov 29, 2010 9:52 AM by philmodjunk

    Own validation message



      Own validation message



      I'd like to know how to create your own error/warning-messages.

      Like, if someone inputs a wrong date, show a message like : you have to input a date between january and march.

      Or something like that.

      Or is there a sample I can download? All the samples so far haven't got much verification/restriction of fields going on.


        • 1. Re: Own validation message

          To use the validation options built in to FileMaker, open Manage | Database | Fields and double click a data (not a calculation) field.

          In the Field Options dialog that pops up is a validation tab. This lists the various options for selecting a validation rule for you field. This includes a calculation option where you can create your own validation calculation such as:

          Month ( Self ) < 4

          to limit dates entered into a date field to January through March dates.

          There's also an option for specifying your own custom validation message to popup when a validation rule is violated.

          The custom validation message does limit you to simple text messages--you can't define a calculation here and this creates awkward validation error messages if you have set several different validation rules for your field. (You can't display different messages for each rule and thus can't tell them which error was comitted.)

          Thus, some developers set up these rules in Field options, but then back up these settings with a script triggered script that intercepts the error and presents a more diagnostic error message than is possible with a straight text "one size fits all" validation error message.