Filemaker Pro 9 (112) Flashcards
This set entered on 8-3-14
8.2.14.1
VALIDATE DATA ENTRY WITH CALCULATION
- What if you want to make sure you enter a Zip Code with only 5 OR 10 characters?
You use the VALIDATE BY CALCULATION option. You could use the validation MAXIMUM NUMBER OF CHARACTERS, but then you could enter a zip with 7 digits….
- To get a Zip Code with only FIVE OR TEN CHARACTERS, you need to:
create a calculation with a Boolean result, that returns a TRUE when the data is valid and a FALSE otherwise.
- How do you VALIDATE [the zip code] BY CALCULATION?
a. Click on the Zip Code field
b. In the VALIDATION TAB, turn on VALIDATE BY CALCULATION
c. Choose TEXT FUNCTIONS
d. Choose Length (Text )
- What does the LENGTH FUNCTION do?
It returns the LENGTH of a text value. You use it here to see how many characters are in the Zip Code field.
- So you put the Zip Code Field inside the LENGTH FUNCTION, where it becomes:
the PARAMETER of the LENGTH FUNCTION.
- Now that you have a FUNCTION to tell you how long the zip code is, you need to:
use the COMPARISON OPERATOR to compare it to something. In this case, use the “=” operator and type a 5 after it.
- Now, if the Zip Code is 5 characters long, the LENGTH FUNCTION returns:
a TRUE. But you also WANT TO ACCEPT A ZIP CODE WITH 10 CHARACTERS. So in the Operator List, choose “or.”
- What does the OR operator do?
It connects two Boolean values and returns TRUE if EITHER VALUE IS TRUE.
- Insert another LENGTH FUNCTION after the OR operator and:
type a “=10”
- The complete calculation looks like:
Length ( Zip Code ) = 5 or Length ( Zip Code ) = 10
- Most validations occur as soon as you leave the field, even if you’re just moving to another field in the record. But some Validation Types don’t happen until:
you LEAVE the record. This includes most calculations.