GIS ObjectLand. User Manual
previouscontentsnext / Tables and queries / Chapter 26. Searching records in a table

The notion of search condition

When working with tables searching is one of the most widespread operations – “find and display records which…”. For example, for the table “List of Building Certificates” the following examples of such operations may be given:

How to get answers to such questions using ObjectLand tools?

One of the possible solutions is sorting records by appropriate fields. For the first request – by field “Street”, for the second – by fields “Is Municipal?” and “Date of Last Repair”, for the third – by fields “Is Municipal?” and “Number of Storeys”. All records will be displayed in the sorted table, however, those which should be found will be grouped together. Clipping of other records can be performed when browsing the table in detail.

A more natural solution will be using the search operation which permits the user to find the necessary records and display these records only.

To perform the search operation it is required to specify the search condition. A search condition is a condition (limitation) set for the values of table fields. For some record the condition is considered true if the limitation set for the values of the record fields is satisfied for the present record, otherwise the condition is false. When performing search operation the records for which the condition is false are clipped, and only records for which the condition is true are displayed.

Search condition may consist of one or several simple conditions. Simple condition enables specifying a condition (limitation) for the value of one field only.

Here are some examples in which simple conditions and fields for which values limitations are set, are singled out:

the value of the field “Street” is equal to the string “Sea Lane”;

the value of the field “Is Municipal?” is equal to “True”;

the field value “Number of Storeys” is not greater than two;

In the last three examples search condition is made up of two elementary ones and the evaluation of conditions as a whole for being true or false performed on the basis of simple conditions occurs in different ways.

While for the operations: “find and display certificates of municipal buildings located in Sea Lane” and “find and display certificates of municipal buildings repaired before 1994” truth of both simple conditions is required so that the condition was true as a whole, for the operation “find and display certificates of buildings located in Sea Lane and Theatre Avenue” truth of one simple condition is enough so that the whole search condition was considered true.

To specify different methods of combining simple conditions, logical operators are used.

previoustopnext