1 Reply Latest reply on Mar 17, 2011 8:08 AM by philmodjunk

    conditional formating text field number of characters

    kilbot

      Title

      conditional formating text field number of characters

      Post

      I have a field that contains numbers but is marked as text because the number sequence has leading zeros.

      ex: 0023

      I want to make the field require that 4 characters (digits) be used. Would I do this through conditional formating?

      Also

      I have a text field that is used for fiscal year and i want to set it up so that you must enter 2 digits only or 2 digits / 2 digits

      ex: 11

        or 11/12

      Can this be done with conditional formating too?

        • 1. Re: conditional formating text field number of characters
          philmodjunk

          Use a validation rule or auto-entered calculation instead. A validation rule can throw up a message requiring the user to modify their input. An auto-enter calculation can "fix" the input for them.

          For leading zeros, use Auto-enter:

          Right ( "0000" & Self ; 4 )

          For the 2, or 2/2 field use a validation rule:

          ( Length ( self ) = 2 ) or ( ( length ( self ) = 5 ) and ( Middle ( self ; 3 ; 1 ) = "/" ) )