GIS ObjectLand. User Manual
previouscontentsnext / Filters / Chapter 36. Using table information about features in filters

Using queries in filter condition

In some cases when specifying simple conditions of filter group it turns out that it is better to use not the fields of table linked with the feature type, but the fields of query based on this table. Two situations of this sort can be used as examples:

However, it is not that easy. Sometimes, the result of using a query in the filter condition is far from expected or is not clear. For example, let the calculated field “Total Inhabitants” from the query “Allocation of Inhabitants by Streets” be used in the condition for buildings. The user can expect that as a result, the displaying style of a building will be determined by the total number of inhabitants in the street where this building is located. In fact, only the number of inhabitants in the present building will be taken into account.

To understand why it happens so one should understand the general algorithm of using query fields in filter simple condition. The essence of this algorithm is the following:

Now it is quite easy to understand why the total number of inhabitants is not summed up by all street buildings. There is only one certificate for any specified building, if any certificate at all, (since the link with the table “Building Certificates” is set as unique). That is why the “temporary table” contains not more than one record. The operation of adding the number of inhabitants by streets will be “addition” of the only item – the number of inhabitants in the present building in this case.

For the user who is afraid to get lost in the details of using queries when specifying filter condition we can recommend the following:

previoustopnext