Search and Filter Comparison Types
When creating Search and Report DataPages it is very useful to understand the logical operators and comparison types. Knowing what these elements are and how they work can help you to create more advanced and functional DataPages.
Logical Operators
AND is by far the most common logical operator used in Search and Report DataPages. Any piece of information that is entered into a search page with an AND operator will narrow the search results.
OR is used to create an un-restricted search. Any piece of information that is entered into a search page with OR as the logical operator will broaden the results returned.
In the example image below, the green area represents the records that will be returned from a search.

| Equal | A positive match occurs when the provided value is identical to the field value. Not case sensitive. Date/Time fields must match for the entire date and time.Applies to: Text, AutoNumber, Number, Date/Time, Yes/No, File |
| Contains | Keyword(s) are searched within text fields or file names. If multiple keywords are entered, AND operator is assumed between them. User can also provide a desired operator by entering it in ALL CAPS (i.e. blue OR orange). Use parenthesis to group parameters.Positive match: "The flower that is red." Negative match: "Blue flower"
Positive match: "The flower that is blue." Negative match: "Pink flower" Positive match: "Can a red flower turn blue?" Negative match: "Red flower" Applies to: Text, File |
| Greater Than | The Greater Than comparison type can be used to return records with number values higher than the search value. Date values will be returned if the record value is after the search date. Greater Than can also be used with text values to return strings that would appear alphabetically after the search text string. Capitalization is not considered when comparing text strings.Applies to: Text, AutoNumber, Number, Date/Time, File |
| Greater Than or Equal | All fields containing values greater than or equal the provided value are a positive match. Characters are compared based on their alphabetic position. B is greater than A and C is greater than either A or B.Applies to: Text, AutoNumber, Number, Date/Time, File |
| Less Than | the Less Than comparison type returns records with number values lower than the search value. Date values will be returned if the record value is before the search date. Less Than is also used with text to return strings that would appear alphabetically before the search text string.Applies to: Text, AutoNumber, Number, Date/Time, File |
| Less Than or Equal | All fields containing values less than or equal the provided value are a positive match. Characters are compared based on their alphabetic position. B is less than C and A is less than either B or C.Applies to: Text, AutoNumber, Number, Date/Time, File |
| Does Not Contain | Performs a negative search on the data within a field and returns records that do not contain keywords defined in the search. A positive match occurs when the keyword(s) are not found within text fields or file names. If multiple keywords are entered, an AND operator is assumed between them.Applies to: Text, File |
| Not Equal | The Not Equal comparison type will return all records except records where the field data is the same as the search value. Capitalization is not considered when comparing text strings. Apple is equal to APPLE, for example.Applies to: Text, AutoNumber, Number, Date/Time, File |
| Is Blank | Is Blank creates a checkbox so users can limit their results to only records that have no data in the search field. If the checkbox is not checked, the field is ignored.Applies to: Text, Number, Date/Time, File |
| Is Not Blank | A positive match occurs when the given field has some value.Applies to: Text, Number, Date/Time, File |
| Today | When comparing date values the Today comparison type will return only records where the date value is equal to Today. This field will be hidden from the end-user.Applies to: Date/Time |
| Current Week | The Current Week comparison type will return all records that have date values from the previous Sunday until the following Saturday. This field will be hidden from the end-user.Applies to: Date/Time |
| Current Month | A positive match occurs when the value of the date field is equal to any of the days in the current month.Applies to: Date/Time |
| Current Year | A positive match occurs when the value of the date field is equal to any of the days in the current year.Applies to: Date/Time |
| Previous X Days | This comparison type limits results to only records with date values within the previous X number of days. Dates with date values equal to today will be excluded. This field will be hidden from the end-user. At design time you specify the value for X.Applies to: Date/Time |
| Next X Days | This comparison type limits results to only records with date values within the next X number of days. Dates with date values equal to today will be excluded. This field will be hidden from the end-user. At design time you specify the value for X.Applies to: Date/Time |
| Before Now | The Before Now comparison type limits results to only records that have date data falling before the current date/time. If time data is absent then all records with date data matching today will be included. This field will be hidden from the end-user.Applies to: Date/Time |
| After Now | The After Now comparison type limits results to only records that have date data falling after the current date/time. If the time data is absent then all records with date data matching today will be excluded. This field will be hidden from the end-user.Applies to: Date/Time |
Combining comparisons and range searches
If you would like to use more than one comparison type for a single field you can add criteria using the Insert button. This way you can include the next X number of days, today, and the previous x number of days. You can also change the logical operator to AND and create range searches. In the DataPage wizard proceed to the Configure Search Fields screen. The Insert button is located on the bottom right corner of the DataPage Elements panel.

Date/Time Precision
Fields of type Date/Time automatically contain both date and time values, however there may be cases where you want to search for all records belonging to an entire year, or a range of months. In these situations, you can to control the precision by which the date and time values are compared against the search criteria.
To configure the precision of Date/Time fields, use the Precision option in the Configure Search Fields screen (Figure 1).

- Date and time: Both date and time values are used in the search. User must search for exact values: “1/12/2007 11:20:23”.
- Date: Ignores time values and uses only the date to find matches.
- Month and Year: Both the day and time portions are ignored.
- Year: Ignores everything except the year portion of the date.
