9 Replies Latest reply on Oct 24, 2012 3:44 PM by Epa

    Validation warnings

    Epa

      Title

      Validation warnings

      Post

           I have 2 fields in a portal.  1 contains a drop down list.  When anything on this dropdown list is selected (except for 1 item), I have a script trigger to bring the cursor into a comments field for the user to type a description.  I set a validation calculation so that if the field is left blank, a message will pop up stating "Please enter your comments." Works great except then another message pops up with the options to Revert or Cancel.  This second message is very confusing to a user in my opinion.  Any way to rid of it? Thanks

        • 1. Re: Validation warnings
          schamblee

               Your comment field is the wrong type (For example number instead of text) or your validation is set to be different than what is in the comment field.

          • 2. Re: Validation warnings
            philmodjunk

                 Your "another message" would appear to be a case where a different validation rule has been broken and thus you get a different message. You'll need to check the validation options set for each of the fields in your layout's table to see if you can figure out which one has the validation setting responsible for this message.

            • 3. Re: Validation warnings
              Epa

                   Should have been more clear on my first post.  The second message is: "Revert all changes to this record since it was last entered?"

                   I only have 1 validation calculation, which basically states that if a field 1 reads "Xxxxx", then the field 2 cannot be empty.

              • 4. Re: Validation warnings
                schamblee

                     The same still applies.  Filemaker is asking to revert the data because it fail the validation test.

                • 5. Re: Validation warnings
                  Epa

                       I think my validation calc is incorrect then.  I am trying to say that if a user selects any value from a drop down list table::list other than "Incomplete", text must be entered into the table::comments field

                       I was using an IF statement: If (table::list ≠ "incomplete; not isEmpty (table::comments); isEmpty (table::comments)

                  • 6. Re: Validation warnings
                    philmodjunk

                         What happens if you use:

                         ( Table::list = "Incomplete" and IsEmpty ( Table::comments) ) or Not IsEmpty ( Table::comments )

                         And on which field did you set this validation?   List or Comments?

                    • 7. Re: Validation warnings
                      Epa

                           I set the validation on the comments field.  The formula you provided doesn't work in my portal (the record just gets filtered out and disappears fromm y portal as if there weren't any validation).  I have filtering on, and I am tryng to make sure that a user fills out the comments section.  If they don't fill out the comments section, then I want the record to remain visibe in the portal until they do.  

                           I have set up a few complex portals, and I cannot change the filtering to do the above, so I am trying to get this done via validation.

                      • 8. Re: Validation warnings
                        philmodjunk

                             It may work better for your users to handle this issue from a script performed by the OnValidation Trigger. This can enable you to display a custom dialog telling them what went wrong and return them to the field that's missing data before the record get's committed and thus filtered out of the portal.

                        • 9. Re: Validation warnings
                          Epa

                               I actually solved the problem using an "If" statement in portal filtering.  Don't know why I didn't think of this before.  Time to take a break.......

                               Thanks for the help, I learned new methods.