3 Replies Latest reply on Mar 9, 2015 2:23 PM by psijmons

    lock record fields after sign-off


      I have a situation where I need to lock down several fields in a record once it has been signed off, e.g. a container field with a signature.  What I created was a short trigger On-Entry script which logic said if Sign-off field is empty allow entry else display a caution message and skip to next field. This works well except when there are radio buttons and one directly selects over radio choice.  At that time it will make the change and then display the caution message. If there regular drop down menus or non there are no issues. Suggestion, is this an FMP anomaly, etc.. 

        • 1. Re: lock record fields after sign-off

          I think I would handle this via field validation with a suitable fail message rather than a script trigger. Validation rules apply to the field wherever it appears, whereas script triggers only apply to any specific field instance where they have been applied and, as you've found, how/when they fire can be an issue.

          • 2. Re: lock record fields after sign-off

            Yes, best to do it via field validation.

            The "Validated by calculation" option allows to write code that evaluates either to false or empty = Fail or true = Valid.

            I think in your case the Validation option must be set to "Always". And as keywords pointed out, a message can be added to the validation at field level.

            I sometimes build a backdoor in the calculation for account with Admin privilege so the data can be corrected if need be.

            Depending on how critical the fields are of course.

            The only thing that is nasty is the "Revert record" Dialog. I wish FMI gave an option to silence that also at field level.

            • 3. Re: lock record fields after sign-off

              Beware that the average user is reluctant to press a button that says Revert (in some languages the wording is even more threatening) and keeps pressing Cancel until they reach for the task manager to kill the whole program.


              For that reason I avoid field validation where possible and set a colored message in a global field when a warning needs to be given to the user and all potential problems are dealt with by the script.

              Screen Shot 2015-03-09 at 22.20.36.jpg