At times, you may need to validate on a range of variables. One way to do this is to create a validation so it falls within a certain, specified range would be to build an If-Then-Else statement:
|Expanding the Idea||
However, if the range ever needed to be changed, or if you wanted to test a number against a group of ranges, the "If-Then-Else" Abacus would have to be changed.
A better method would be to build a separate relation to store the ranges.
|Create the Relation||
Create a Range Relation containing two number Fields called "Lower" and "Upper." Create an entry View and type the appropriate ranges:
|Create the Abaci||
Then create a "0 or 1 Abacus and a "Total" Abacus:
|Test the Value||
In the Relation where the input should be validated, create a validation Abacus (as shown below) and attach it to the Field you want to test.
|Validate the Field||
Double-click on the Field, click the "Validate" button and select the validation Abacus.
Create an entry Template and a correspding View to test a number.
When you type in a number, the "0 or 1" Abacus decides if the number is within a range. The Number tile converts False to 0 and True to 1. If the value does not fall into the range, the validation will occur and a message of your choosing will appear when the user selects Why? under the Apple menu.