Selection Criteria Examples
The following table lists sample criteria formulas for various data types.
Data Type | Description | Examples |
---|---|---|
ID | There is only one field of this type. The ID field contains the main identifier of the profile. | Finds the profile where the ID equals 20020
Finds all profiles except for the profile where the ID 20020
|
CHARACTER | Fields of this type contain a single line of text information, such as Name or Address. | Returns records where the person's last name is Nick.
Returns records where the LastName is alphabetically less than M.
Returns records where the LastName is alphabetically greater than or equal to M.
The address field is blank.
The address field is not blank.
The LIKE operator compares a character value to a pattern that can pattern matching methods:
LastName starts with the letter M.
The address contains the word cherry.
ZipCode is not a five-digit zip code.
|
LOGICAL | Fields of this type contain TRUE/FALSE or YES/NO information. | The ReceivesFreeMilk field is equal to TRUE. The =TRUE part of the formula can be omitted.
The ReceivesFreeMilk field is equal to FALSE. An alternative way to express this logic is "Not ReceivesFreeMilk."
|
NUMERIC, INTEGER, or SCORE | Fields of these types contain numbers. Numeric and score fields allow decimal places. Integer fields do not allow for decimal places. | The number of days absent equals 5.
The number of days absent is less than 5.
The number of days absent is greater than 5.
The number of days absent is less than or equal to 5.
The number of days absent is greater than or equal to 5.
The DaysAbsent field does not contain a number.
The DaysAbsent field contains a number.
|
DATE AND DATETIME | Fields of these types are formatted as a date or date and time. | The date of birth is before June 30, 2010.
The profile was created on December 12, 2013, at 1:33 PM.
The profile was created on December 12, 2013, at 1:33 PM.
|
KEYWORD SELECTION | Fields of this type contain a selection from a pre-defined set of choices. For example, the field, Sex, contains pre-defined values of Male and Female. Although you cannot compare keyword values using greater than or less than, you can effectively use the Order keyword. For example, Grade.Order gives the index position of the Grade value in the keyword table (0..n-1). The top keyword in the keyword table corresponds to zero. So if you want to test if one grade field is greater than another grade field, you could use NextGrade.Order > Grade.Order. To access values stored in the fields of a keyword table (other than the keyword itself), use the format KeywordField.FieldName. To retrieve the keyword as a character field (for example, you want to force the display of the keyword code on a standard report), use the format KeywordField.Keyword. | The Sex field is equal to the keyword Male.
The Sex field is equal to the keyword Female.
The Grade field is equal to the keyword 01.
The Grade field is not equal to the keyword 08.
The Grade field does not contain a keyword.
The Grade field contains a keyword.
The grade is 03, 04 05, 06, or 07.
The grade is not 03, 04 05, 06, or 07.
|
PROFILE REFERENCE | Fields of this type contain a reference to a profile of a different type. For example, in the student profile there is a HomeSchool field that references a location profile. | HomeSchool field is equal to the location with an ID of 100010.
HomeSchool field is not equal to the location with an ID 20020.
HomeSchool field is empty.
HomeSchool field is not empty.
With a profile reference field, you can also use a period operator (.) to access fields in the profile. The home school is in NJ.
The location of the reading class is equal to the ID of 100010.
The last name of the teacher for the Reading class is Kelly.)
|