2 Replies Latest reply on Jan 3, 2016 9:56 PM by macwombat

    Field Validation Question, evoking field validation in a script before it proceeds.

    pjpique

      Hello,

       

      I have a question on field validation.  Currently, I wrote validation into the scripts before it checks and copies records over to the main Database table for data entry.  I know, there are lots of options within file make in the field options to put in validation criteria.  However, is there a way to evoke field validation in a script before in proceeds?

      I see that, if I'm currently in a field i can click the button to submit my entry to the main table and it doesn't check validation.  If i click out of the field it checks validation. 

       

      In efforts for performance and lessen script steps, it would be nice to be able to call a validation check in the script rather then write the code in the script.  But then again, maybe its better to do the validation manually in my script.  Asking for your thoughts and help once again.  This step is too keep data entry idiot proof, as often hard as it is to do.

       

      Thank you in advance.

       

      PJ

        • 1. Re: Field Validation Question, evoking field validation in a script before it proceeds.
          keywords

          If you are already entering data via a separate data entry table then I would suggest you manage data validation via scripting, not via field schema. To keep it idiot proof, you would also need to prevent users from creating records directly in the main data table, which you can do via account privileges, custom menus, etc.

          As far as validation within your script is concerned, you can generally set this up with better user communication than using FM's field validation anyhow. You can use Conditional Formatting on the data entry layout to visually communicate to the user fields that must have data, or even have particular types of data. And the script would specifically check each field against whatever validation criteria you want to use and spit the user out—with an appropriate message—if validation fails.

          • 2. Re: Field Validation Question, evoking field validation in a script before it proceeds.
            macwombat

            If your user is in the middle of a scripted data entry process, you can have script triggers on fields that will run validation subscripts and then return to the main scripted process.