Use of filters to create views, trips and statistics

Entering data into a database is one thing, extracting that data in a useful manner is another. This application has several options to do just that, with many customizable options. This page explains what options there are and how these can be used to build the views and reports needed.

Creating a filter

Filters are in essence a set of instructions that tell the database which plane records to select and how these plane records should be ordered. A filter can be created through the filter creator box. This box appears on all pages where searches can be made, like on the plane log select page, but also on the wrecks & relics search page and the Flickaircraft index search page.


Filter create box

There are three elements in the filter creator:

Select

The select element allows for creating the filter rules defining which plane records should be selected or which should not be selected. Selections can be made on all available fields, plus a "full year" field, which will select on the log date field, but for the year part of the date only.

Once a field is selected the selection rule can be defined by setting the selection operator. There are 7 possible operators:

The third input in the select element is the value to select on. While typing, a picklist will show possible values which can be selected with mouse or keyboard. Multiple values can be entered by separating the values with a comma. For example all Embraer E-jets (Embraer 170 and Embraer 190) can be selected with the following select rule:


Example: selecting all Embraer 170s and Embraer 190s

Note that the above example will select both types, but selecting two types in separate selection rules will not work. This would be equivalent to saying "select all records where the main type is Emb.170 and the main type is Emb.190" which is not the case for any record.


ERROR: this selection will not work

All commercial Airbus planes (A300 to A380) can be selected by using the >= and <= operators.


Example: selecting all Airbus commercial planes

Extra select rules can be created by clicking on the "add a select rule" link below the input boxes. There is no limit to the number of select rules used. Select rules can be removed again by clicking on trash can icon to the right of the rule. Empty rules may be kept, but will be ignored when the selection is made by the database.

A special selection can be made on "new" planes (see: help/new). For all view, count and trip filters a filter can be set on new planes by checking the checkbox below the selection filter box. If the box is checked, only the logged planes considered new will be used, if the box is left unchecked, all logged planes will be used. The "new" filter is not available for searches in the wrecks & relics planes and Flickaircraft index.

Sort

Sorting defines in what order the plane records are shown in a view. All fields can be sorted on (including the extra field "full year") and sorting can be done in ascending and descending order. Simply select the field in the first input and the order in the second. The default sorting order is ascending if no order is selected. Sort rules where no field is selected will be ignored by the database.

As many sorting rules as needed can be defined for each filter. A rule can be added by clicking on the "add a sort rule" link underneath the inputs. Sort rules can be removed again by clicking on the trash can icon to the right of the rule.

Note that the order in which the sort rules are created has an effect on the results. Creating a sort rule on country first and main type second, will show the plane records differently from when a sort rule on main type is created first and country second.

Sorting is not available for trip reports and counts. Trip reports are sorted in a standard manner, while counts cannot be sorted.

Group

Grouping is needed to split a count filter over the correct values. When a count would be made without any grouping, all selected records will be added to one grand total. Grouping on a specific field will split that total into subtotals for each value found within the selection.

If for example a count is made on "Boeing 737", without any group field selected, the count grid will show one row. That row will contain all yearly totals for the "Boeing 737" seen in each year. By grouping on location, the count grid will show multiple rows, one row each for every location where a "Boeing 737" was ever recorded.

Only one group field can be selected per count filter and grouping is only available for counts, not for views or trip reports.

Executing a filter

While on the view, trip or count pages, the filter in effect can be changed. However, these changes will not go into effect immediately. The filter will only be used after clicking on the "Run filter" button.

Saving filters

(not available for wrecks & relics linked planes and Flickaircraft index searches)

Once a filter is created and executed, the used filter can be saved to use again later. Click on the "save current filter" link in the bottom left of the filter creator box. This will open up the following screen:


Screen to save a filter

Enter a (unique) name for the filter, a description (optional) and if the filter is private or public. The name must be unique because it will identify the filter through a unique url. After saving the filter the url can be found on the select page, underneath all standard filter boxes.

The privacy settings (private filter or public filter) determine who is able to view the filter. Private filters can only be viewed by the creator of the filter, while public filters can be viewed by anyone who knows the url. Do note that although public filters are viewable by everyone, the filter settings are not. Only the creator will be able to change the filter settings, other viewers will not be able to see any data that is not selected by the exact filter stored.

Each saved filter is associated to either a view, count or trip report. A filter cannot be used to create another page than for which it is created.

Setting a default filter

Once a filter has been created, it can be flagged as the default filter. The default filter will be loaded upon page load of the respective page (view, count or trip report) and no other filter is specifically requested. Only one filter each can be set as the default for the view, count and trip report pages.

A default can be set on the filter page. In front of each filter is a check mark. A green check mark indicates the filter is the default filter for that type of report. Simply click on a check mark to toggle it (on or off). Setting one filter as the default will unset the then default filter for that type.


Two saved filters with the first flagged as the default