Filters - Basic Concept
Filters are at the same time the most powerful feature of Pimlical and also the most puzzling to the new user since itís a concept thatís not been seen in calendar applications before.
The basic concept of a filter is that it allows total control over what appointments and tasks are displayed. Filters can be applied to any field in the database and can be used for two different purposes. The Find aspect means that you can use a filter to find all events that meet certain criteria (such as all completed events, or all events containing a specific test string). The View aspect means that you can use those same filters to also control what gets displayed in any regular calendar view.
Think of a filter as a sieve as in the illustration above: We start off with green and red blocks and smaller green and red circles. The first sieve filters for size, so only those items which are round and small enough drop through the first sieve. The second sieve filters for color so only red items slip through. After going through both sieves, only the small, red items remain.
Pimlicalís filters work the same way. In the Advanced find dialog, you find myriads of checkboxes. If a checkbox is checked, then any item which has that attribute is allowed to slip through the sieve. However, if the checkbox is unchecked, then an item with that attribute will not slip through the sieve.
At the very end, only those items which slipped through every single test in the filter are going to appear in the find or view aspect.
The default setting for filters is to have everything checked, so you "tighten" up the filter and make it more restrictive by unchecking various checkboxes, so items with that attribute are filtered out of the display.
For example, the default filter will display completed items. In many cases, you may want to hide completed items, so you uncheck the Completed checkbox to filter out those items which are completed. Pimlical/Android comes with a default filter, Hide_Completed that does just that.
The vast majority of peopleís needs are actually taken care of by a relatively small number of filtered attributes, but as databases get larger and larger and more complicated, the need to be able to filter exclusively for some group of items becomes more and more important. You may want to perform a search and replace operation across a group of items, but in that case, itís only useful if you can be really selective in terms of which items get modified.
Filters in Pimlical/Android
Pimlical installs with a few basic filters, but you can create as many filters as you like. Filters can be used to filter a view (for example, display a view, but only events that have a particular icon attached to them) or to find items (for example, find all events in the future that have been canceled).
The basic set of filters included with the installation includes:
Default - This filter is always present in Pimlical, and while it can be modified, it can not be renamed or deleted. The default filter shows all events, tasks and floating events and masks private events.
Appointments_Only - this filter only displays appointments: tasks and floating events are hidden. This is identical to the default filter, except the checkboxes Include tasks and Include floating events are unchecked.
Tasks_Only - this filter only displays tasks: appointments and floating events are hidden. This is identical to the default filter, except the checkboxes Include Regular Appts and Include floating events are unchecked.
Floats_Only - this filter only displays floating events: appointments and tasks are hidden. This is identical to the default filter, except the checkboxes Include Regular Appts and Include tasks are unchecked.
Hide_Completed - this filter hides all completed and canceled appointments, floating events and tasks. The checkboxes for Completed and Canceled are unchecked in the appointments, floating events and Tasks sections, and the checkboxes for separate settings are checked in the floating events and tasks panels.
Show_Private - this filter displays all private records (by default, private records are masked, but they can also be shown or hidden completely). This is identical to the default filter, except that the radio Button in the Private section of the Repeat Rule and Views panel is selected.
Invoking a Filter
To invoke a filter for a view, use menu | Filters and tap briefly on the filter. You can also put the Filters function on the command bar for faster access. If you have a filter that you invoke frequently, you can even put that specific filter on the command bar so it is always just a single tap away. When a filter is hiding certain items on a day, the Date line at the top of the screen always shows a tilde (~) character as the first character to remind you that some items are being hidden.
To invoke a filter for the find function, use Menu | Find and tap the Filter button and then select the filter you want to use to prepare the list of matching events. The results are displayed in an event selection list. As with filtered views, you can also place a specific find function using a filter on the command bar for quick access.
Menu | Filters displays the main filter selection dialog. In this dialog, the currently active filter is displayed with a pink background, while the most recently selected filter is displayed with a light-blue background. Filters for which a View Icon has been defined will also display that icon in the left margin.
To invoke a filter, just briefly tap the filter and it will be made the new active filter. you can always use menu | Views to verify what the currently active filter is.
The button with the green checkmark just exits the filters selection dialog without making any further changes.
Creating a New Filter
You can create a new filter from scratch by tapping the Green plus [+] button at top left of the filter display. You are prompted to pick a new name for the filter and Pimlical then displays the eight panels of the Advanced Find/Filter function where you can set the individual attributes of the filter. You can also create a filter using another filter as a starting off point by using the Duplicate Function (see below). Again you are prompted to provide a new name for the filter, and the Advanced Find/Filter function dialog is then displayed.
Importing a Filter
To import a filter from the Android filing system into Pimlical, tap the Import button and Pimlical will display a list of all the filters that have been stored in the Pimlical folder with a .flt extension. Filters that are already installed in Pimlical are shown in UPPER CASE. Filters in lower case are not installed. You can check which filters you want to import, or just tap the Import All button to import all filters. Filters in Pimlical/desktop are identical to those in Pimlical/Android, so you can import and export filters as .flt files and freely copy them to the other platform and use them.
A long press on the Import button will look for filters in the old format with a .fil extension. These can also be read by Pimlical, although filters are now always written with a .flt extension (in an optimized and more efficient format). You would only need this feature if you realized you had not exported a particular filter with V-3.4x and needed to access an old, saved version of that filter.
Tap on the Export button to export ALL filters currently installed in Pimlical as separate .flt files (the filename is used as the name of the filter file). To export a single filter, see the popup commands.
Long-press a filter in the filter selection list to popup a list of commands that will only operate on that filter. These popup commands include:
When this is selected, you are presented with the Advanced Find/Filter function dialog where you can modify all the attributes of the selected filter and save them.
This command exports just the one, selected filter as a .flt file in the Pimlical folder. This filter file can be subsequently imported or copied to another platform and imported there.
This command makes a duplicate copy of the selected filter. It first asks you for a new name for the filter that is being created. Pimlical then proceeds as if you were creating a new filter.
Pimlical prompts for a new name for the currently selected filter
Clear Filter to Default
Pimlical clears ALL fields in the filter so that nothing is being filtered out. Only the name is preserved.
The selected filter is marked as no longer being protected. You protect a filter by setting the checkbox in the Repeat Rule & Views section, but you can only clear it with this menu command. A protected filter can not be edited, renamed, cleared or deleted.
Pimlical puts up a confirmation dialog and if you tap the OK button, the selected filter is then deleted.
Advanced Find/Filter Function Dialog
When you select the New, Edit or Duplicate functions, Pimlical displays the Advanced Find/Filter function dialog that allows you to set filters for every possible attribute of an appointment, floating event or task. This is a complex, but enormously power function and learning how to use it effectively will make it possible to accomplish tasks that are completely impossible in any other calendar application.
There are eight separate panels and you can switch between them by tapping one of the eight selection buttons at the top of the screen. The currently selected panel button is highlighted with a pink background. The two remaining buttons are the Save button which will save all the changes you have made and return you to the main Filter selection dialog and Cancel which will return to the Filter selection dialog without making any changes. However, if you have made some changes and tap cancel, Pimlical will display a confirmation dialog to ensure that you really want to discard the changes that you have made.
The Eight panels are as follows:
This is the Appointment Panel. All attributes applying only to appointments are shown in this section. The top checkbox is Include Regular Appts. If unchecked, appointments will not be included in the View or Find functions. There are then sections that apply to each attribute:
Repeat: There are five boxes to cover the five types of repeats: None, Daily, Weekly, Monthly and Yearly. Uncheck one of these boxes to exclude that type of repeat. For example, if None is unchecked, then only repeat events will be displayed by the filter. To exclude all repeat events, leave None checked and uncheck the other four boxes.
Status: There are four checkboxes to cover the four possible status conditions for an appointment: Normal, Deferred, Completed and Canceled. The Deferred status type is not managed at this time in Pimlical/Android. To exclude a particular status type, uncheck the corresponding box
Avail. (Type): There are four checkboxes to cover the four possibility available conditions for an appointment: Busy, Free, Tentative and Out-of-office. Again, uncheck the corresponding box to exclude appointments that are assigned to that availability type.
Time: Appointments are either timed or untimed, uncheck the corresponding box to exclude appointments that are time or untimed.
Priority: Normally appointments do not display priority. However, if the preference HidePriorityOnAppts is set to false, priority is then displayed. A dropdown list shows the nine priority levels (1-9) as well as None to indicate there is no priority. In conjunction with the dropdown list are three radio buttons. These allow you to filter appointments for only the specified priority level, that priority level & Higher or that priority level & Lower. There is a note at the bottom of this panel that Items with no priority or urgency will be excluded if an explicit value is selected. To ONLY find items with no priority/urgency, select None and the ONLY radio button.
Urgency: Normally appointments do not display urgency. However, if the preference HideUrgencyOnAppts is set to false, urgency is then displayed. A dropdown list shows the four urgency levels (A-D) as well as None to indicate there is no urgency. In conjunction with the dropdown list are three radio buttons. These allow you to filter appointments for only the specified urgency level, that urgency level & Higher or that urgency level & Lower. There is a note at the bottom of this panel that Items with no priority or urgency will be excluded if an explicit value is selected. To ONLY find items with no priority/urgency, select None and the ONLY radio button.
This is the Floating Event Panel. All attributes applying only to floating events are shown in this section. The top checkbox is Include Floating Events. If unchecked, floating events will not be included in the View or Find functions. Below this checkbox is one labeled: Use these Separate Settings for Floating Event. If this checkbox is unchecked, no other checkboxes are displayed in this panel, and the current settings for Repeat/Status/Avail./Time/Priority/Urgency are taken from the appointment panel. If this checkbox is checked, then all those sections are displayed and you can set the attributes for Floating Events separately from those used for appointments.
There is one additional section in the Floating Event Panel (and also the Task panel below):
Due: There are three checkboxes to filter the display of floating events based upon whether the due date is set to Today, Other (some other date), or None (no Due Date).
This is the Task Panel. All attributes applying only to tasks are shown in this section. The top checkbox is Include Tasks. If unchecked, tasks will not be included in the View or Find functions. Below this checkbox is one labeled: Use these Separate Settings for Tasks. If this checkbox is unchecked, no other checkboxes are displayed in this panel, and the current settings for Repeat/Status/Avail./Time/Priority/Urgency are taken from the appointment panel. If this checkbox is checked, then all those sections are displayed and you can set the attributes for Tasks separately from those used for appointments.
This is the Match (Find) panel. You can set up filters for all the text fields in an event/task: Title (Description), Note, Location, the four custom fields (custom1-custom4) and the Group field. Below these fields is a checkbox Match is Case Sensitive. if unchecked, differences in upper/lower case are ignored.
Below this are two radio buttons:
Any Field: if selected, then if there is a match on any of the text fields, the item will not be filtered out.
All Fields: if selected, then there must be a match in every text field for the item to be included in the display.
The final checkbox in this panel is:
Exclude: if the item contains the specified text string, it will be filtered out of the display.
This is the Date/Time panel. At the top are two buttons to specify the start and end date for the filter. Items that are before the start date or after the end date will not be displayed. These two buttons are only relevant for the Fixed Date Rule. These date settings are only relevant when a filter is being used to find events.
There are then four radio buttons in the Date Rule section to control how dates are handled when the filter is being used in a view:
No Date Rule: indicates that there is no date rule associated with the filter, so dates are ignored. This would normally be selected for a filter that is being used in a find function, or when the current view is to be preserved when switching to this filter.
Fixed: indicates that the start and end dates as set in the two buttons above control the range of displayed events
Days from Today: specifies that when this filter is invoked, the date will be set to today's date with an offset specified in the text field to the right of this radio button. A value of 0 would set the date to today, while -1 would set it to yesterday and 1 would set it to tomorrow.
Months From Today: specifies that when this filter is invoked, the date will be set to a month offset from the current month by the value indicated in the text field to the right of this radio button. The text field above this one (normally used by the days From Today function) then specifies the starting day of the month to use. Normally one would set this to 1 to indicate the date would be set to the first day of the month. For example, if the month offset field were set to -1 and the day offset field set to 15, and today is May 20th, the filter would set the date to April 15th.
Duration: Items can be filtered based upon the duration of the event. Tap the Duration button to set a desired duration value, then select a radio button below to indicate that all events with that specified duration and Shorter, or that exactly match this duration, or that have that duration and longer can be included in the display. Events that do not match this criteria are filtered out. For example, to only display events longer than four hours, set the Duration field to 4h and select the Longer radio button.
Advance: Items can be filtered based upon whether they have an Advance or not. If both checkboxes are checked, then the advance setting is ignored. To exclude events that have an advance, uncheck the Advance checkbox.
Alarm: Items can be filtered based upon whether they have an Alarm set or not. If both checkboxes are checked, then the alarm setting is ignored. To exclude events that have an alarm, uncheck the Alarm checkbox.
Timezone: normally, this field is set to All Time Zones which means that timezones are ignored for filtering purposes. However, you can set this to a specific timezone in which case only events set to that particular timezone are displayed.
This is the Sort Panel. This controls the sorting of items on up to twelve separate levels in either ascending or descending order. The default sort order is as follows - the descriptions cover the Ascending order - using Descending order would reverse the direction of the sort. Items are sorted first based upon the top item in the list. If the items perfectly match, then they are sorted based upon the second item in the list. If they perfectly match on the second item, then they are sorted on the third item in the list, etc. until the end of the list is reached. If items match on all twelve levels. they are then sorted by their unique ID's in order to force the sort to be stable (in other words, the items matching on all twelve levels will always be displayed in the same order).
Class: the class of the event is either Appointment, Floating Event or Task. The default order is Tasks, followed by Floating Events and then by Appointments. At this time, when a filter is used for a view, the order is only used to sort items occurring at the same time (so a descending sort would sort first by time and then by Appointments, floating events, and tasks), but when used for finding items, the descending version can be used and will sort items regardless of their start times.
Due Date: Items are sorted by due date. Appointments have no due date and will therefore sort first. After this, all items that have a due date are sorted in chronological order.
Category Name: items are sorted in alphabetic order based upon their category name. Items in an Android calendar are sorted based upon their calendar name.
Urgency: Items are sorted based upon their urgency level. Items with no urgency will sort first (of course you can set up the filter to exclude items that have no urgency assigned), then followed by the urgency level: A, B, C, D.
Priority: Items are sorted based upon their priority level from 1-9 with 1 being considered the highest priority level and 9 the lowest. Items with no priority will sort first.
Alphanumeric: Items are sorted based upon the alphanumeric ordering of their Title (Description) fields.
Location: items are sorted based upon their location. Items with no location are sorted first, followed by an alphanumeric sort on the location field.
Status: Items are sorted based upon their status field with Normal Items appearing first, followed by items that are Completed, followed by Canceled items and finally by Deferred items.
Type: Items are sorted based upon their Availability type with Out-of-Office items appearing first, followed by Busy items, and then Tentative items and finally by Free items.
Date (Find Only): this sort field only applies when a filter is being used for a Find function, as when used in a View, the date ordering is forced by the chronology of the calendar. For a Find function, items are sorted based upon the Start Date field of the item. However, if the preference ShowInstanceDates is set to true, then repeat items are sorted on the first/next occurrence that appears on or after today's date. This can be useful, for example, when setting up a filter to show upcoming birthdays and putting this sort criteria at the top of the list as the resulting list will then show all upcoming birthdays starting with today and going forwards.
Icon: Items are sorted based upon the numeric icon key associated with an item. To be useful, the icon collection in use might be established with well defined sections that use contiguous icon keys (for example, holiday icons using keys 1-99, office icons 100-199, etc. so the sort could then sort items in a useful manner.
Group: items are sorted based upon an alphanumeric sort of the entire group specification to which the item is assigned.
Changing the Sort Order
To change the sort order, select an item with its radio button and then tap the Up Arrow or Down Arrow buttons to move that item up or down in the sort order list. To toggle the direction of the sort between Ascending and Descending, tap the Change Direction button.
This is the Categories and Icon Panel. This section allows you to filter items based upon either the category to which the item is assigned and/or icon.
The top large button underneath the two radio buttons allows you to select in which categories an event must be assigned in order to display. Selected categories are shown with a green check mark next to them in the displayed list. The All/None button allows you to quickly toggle all the categories so they are selected or all unselected. The two radio buttons control how the selected categories are used:
In Any Category: If selected, this means that an event will display if it is assigned to any category in the list.
In All Categories: if selected, this means that an event will display only if it is assigned to every single category in the list. if there is just one category selected in that list that is not present in the event's category list, it will be filtered out of the display.
But Not In: this button allows you to specify categories, that if present in the item, will cause the item to be filtered out of the display. So for example, you could look for items that are in the Personal or Business categories by including those in the first list, but then prevent items from displaying that were in the Spouse category by selecting the Spouse category in the exclusion list.
Items can be filtered based upon what icon(s) are assigned to the event. You can select up to four icons by tapping on the gray square underneath the three radio buttons. The radio buttons control how those icons are then managed:
With Any: indicates that an item will be displayed if the item has any of the up to four icons specified in the icon display below.
With All: indicates that an item will be displayed only if the item has all of the specified icons present.
Without: indicates that an item will be displayed only if the item has none of the icons specified.
With No Icons: this checkbox if checked blanks out any selected icons above and also clears the three radio buttons, as if it is checked, only those items that have no icons will then be selected for display.
View Icon: this icon is not used for any filtering purposes. Rather it is used to identify the filter in the filter selection list, and also to provide an icon to use on the command bar if this filter is selected as a command bar function.
This is the Repeat Rule & View panel. In the first section of the panel, you can control the startup view and attributes of the various views:
Startup View: this dropdown list allows you to specify which view is invoked when this filter is selected. The first item is Last View/Date which means that the currently displayed view and date are preserved (you should also set No Date as the date rule for the filter). The other six selections specify one of the six main views for the filter.
Days in Day+ View (Portrait): specifies the number of days to be set in the Day+ View, when the device is in portrait mode. This is equivalent to a long-press on the Day+ view button in menu | Views.
Days in Day+ View (Landscape): specifies the number of days to be set in the Day+ View, when the device is in landscape mode. This is equivalent to a long-press on the Day+ view button in menu | Views.
Force Day+ view to Start of Week: When checked, the Day+ view will be forced to always start on the first day of the week (which itself is a preference item). If not checked, the Day+ view will start on whatever day is currently selected.
Weeks in Week View: specifies the number of weeks to display in the Week View. You can select 1, 2 or 4 weeks for the display.
Months in Month+ View: specifies the number of months to display in the Month view. You can select 2,4,6 or 12 months for the display.
Days In List View: specifies how many days are displayed in the list view. The number of days is also limited by available memory, so some Android devices may not be able to scroll directly through more than a few days if the calendar is unusually dense. Picking 366 days (a year) is typically only used in a filter that is listing a small number of items as otherwise, there certainly would not be enough memory.
The next section has four checkboxes:
Save Custom Preferences with Filter. This checkbox is not displayed if the currently selected filter is the Default filter as by definition the Default filter is associated with the Default preference file. Normally, this is not checked and there is only one main preference file. By checking this box, you can create a custom preference file with the same name as that of the filter and which is invoked automatically when that filter is selected. This provides a powerful capability for customization as by invoking a filter you could then change any number of preference settings with a single tap.
Only Show next Occurrence of Repeats. This checkbox provides an override capability to only display the next occurrence of a repeat item. Items in their repeat specification can specify that only the next occurrence is displayed, but this filter item makes it possible to have a global override where all repeat items are treated as if this checkbox was checked.
Filter is Protected. This checkbox if checked will prevent a filter from being deleted or inadvertently modified. If you attempt to delete, rename, reset or edit a filter that is protected, an error message appears indicating that the filter is protected.
Only include Deleted items. This checkbox if checked filters out all non-deleted items, so that only deleted items are displayed. Normally, deleted items are never included in the display.
The next section handles the display of private events.
Show: Private events are displayed normally just as if they were non-private.
Mask: Private events are masked from normal display so a casual glance will not reveal the event
Hide: Private events are hidden and not displayed.
Only: Only private events are displayed, and all non-private events are hidden.
The final section is the Repeat Section. This is an advanced feature that allows a filter to be automatically invoked and removed based upon a repeat specification. This allows you, for example, to have an Office filter which sets up everything the way you want to see your calendar when you are at work. This filter might have a repeat specification that is a weekly repeat with Mo/Tu/We/Th/Fr selected for display, a start time of 9:00am and an end time of 5:00Pm. The filter would then be automatically invoked at 9:00am, Monday morning, and would stay in effect until 5:00Pm Friday at which point the filter would be automatically removed and control would pass back to whatever filter was in effect previously.
To set a repeat specification, tap the large button which normally displays the legend (No Repeat). You can then select a repeat specification in a manner identical to how you would select a repeat for an event. Irregular repeats are not available for repeat filter specifications.
The four buttons underneath allow you to set the start and end date/times for the filter.
An automatically invoked filter is only invoked one time when the repeat specification indicates it is time to trigger the filter. The reason for this is that if you switched to another filter, you would not want the filter with the repeat specification to instantly override the filter you just set manually. However, if you go into the Filter Dialog, and tap the Green Done button or Edit any filter, Pimlical intentionally 'forgets' that a filter had been invoked automatically and will allow it to trigger automatically just one more time. This facilititates testing of repeat specifications on filters. If you just go into menu | Filters and tap a filter in the list, any repeat filter that would otherwise be invoked at the present time will not be invoked if it had already been invoked previously on the same day.