5 Replies Latest reply on Jul 27, 2012 10:19 AM by philmodjunk

    Validation by Check Mark

    MickellLethco

      Title

      Validation by Check Mark

      Post

      I would like to make it so a certain field "Other ID" can only be edited if the check mark field "No DL" has been checked (selected as ON). I believe it's called a validation, right? How do I do it?

        • 1. Re: Validation by Check Mark
          philmodjunk

          Find the Other ID field in Manage | database | fields.

          Double click it to open Field options.

          Click the validation tab.

          Select the calculation option and enter:

          Not IsEmpty ( Other ID )  // I'm assuming the field is blank until the check box is clicked to indicate No DL.

          You can then decide whether or not to permit user Overrides of this validation rule and you can enter your own validation message that will appear if the user attempts to edit the field when the check box has not been clicked.

          Note: that validation rules allow the user to edit the data, but if a validation error occurs, a message appears and the user is required to either revert the field or edit the field until the validation no longer fails. (Unless the user is permitted to override the error message.)

          Other technques can prevent users from even entering the field.

          The OnObjectEnter script trigger, for example, can perform a script that uses go to field, go to object or go to next field to put the focus on a different layout object if the "NO DL" check box has not been selected.

          • 2. Re: Validation by Check Mark
            MickellLethco

            Is there any way to make it impossible to enter the field unless that box is checked? There's no reason to enter that data unless the box No ID is checked. Does that make sense?

            • 3. Re: Validation by Check Mark
              philmodjunk

              From my previous post:

              Other technques can prevent users from even entering the field.

              The OnObjectEnter script trigger, for example, can perform a script that uses go to field, go to object or go to next field to put the focus on a different layout object if the "NO DL" check box has not been selected.

              I'd still keep the validation rule, however. It can serve as insurance in case the user finds a way around the script trigger. (Drag and drop won't trip onObjectEnter, for example.)

              You can also remove the field from the tab order (see the set tab order tool) and then format the field as a button where clicking the field performs a script that checks the value of the check box field and uses go to field to put the cursor in the field only if the correct value is set in the check box field.

              • 4. Re: Validation by Check Mark
                JimMac

                I had same problem, but users see a field box and fill it in!Cry

                I have used Conditional Formating to make that aggrivating field and its label "invisible" when "NO DL" is not checked.

                If...

                The body of your Layout is say Light Blue and the field background color is White and Label is black colored.  

                Then...

                Use the Formula is.. making the background and label color Light Blue   wah lah  "invisible"  Cool

                Now when "NO DL" is checked

                the default colors return.  You can still do what Phil, suggest too!  

                Jim...

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                 

                • 5. Re: Validation by Check Mark
                  philmodjunk

                  Good point Jim.

                  There are actually several ways to make such a field disappear. Some even keep the field from being accidentally clicked on like can happen if you just color it to match the layout background.

                  Here's a demo file that uses several different tricks to hide fields and other layout objects from view: https://www.dropbox.com/s/8levaz6deiyzjr8/LayoutObjectVisibilityControlDemo.fp7