Tech Tip: Numeric Field Constraints
December 7th, 2009 Comment on this articleWhen setting up your fields, you might want to require users to type in values that match a certain pattern, or fall within a certain range. In the past, Laserfiche allowed you to restrict the format of data typed into character fields; in Laserfiche 8.1, we have added the ability to restrict the range of values that can be typed into a number field. Unlike character field constraints, numeric field constraints don’t restrict the format of the field—they restrict the valid values that can be input.
For instance, you might have an invoice number field, where all invoice numbers will be between 1000 and 5999. You could prevent users from typing in values that don’t fit in that range, and which are therefore invalid invoice numbers. Alternately, you might have a number field that stores a percentage value. Since your percentage will always be between 0 and 100, you could restrict the values to that range. Constraints are set up using Boolean operators; for instance, to indicate that a field should not contain a negative number, you could use the constraint “>=0”.
Instructions for setting up a number field constraint can be found in the Laserfiche Administration Console help files, in the “Restricting Field Data to a Specific Format” section.
- Link this:
- Print this article


