SeedCodeCalendar

Filters

These are the docs for our FM10/11 version of the Pro Calendar. Docs for the newer, FM12 version of our calendar can be found here.

How can I filter the calendar?

Filters operate like a find request, letting you see just a subset of the events in the calendar.

Filters are available on the Filters tab in the left hand status area. SeedCode Calendar ships with four filters in place already: title, project, status, and resource. To see how this works, select an item in the status filter and you'll see the calendar change to show just the items of that status. Note that you can select more than one status in the filter.

Now click "Omit" beside the filter and you'll see everything except events of the status you've selected.

The title filter works the same way: type in "Call" and you'll see all the events where a work in the Summary begins with "call". These filters works just like the "constrain found set" find request you're already familiar with in FileMaker.

Filtering on different fields

You can point the existing filters at any fields in your events table that you'd like. Mapping filters to fields is done in the "Load Calendar Settings - On Startup..." script you edited as part of your integration.

Can I add new filters?

Sure. Let's say you wanted to add a filter called "Staff" so you could see just the events for one or more staff members (for just you, or for the members of your team). Here's how you'd do it...

1. Create a staff name field in the events table.
If you don't already have a field in your events table for the staff member's name, create one. For the sake of this example we'll use the staff member's name as the filter, but you could use their ID, etc.
2. Create a value list for staff names. Then create a global text field in the CalendarInterface table called FilterGlob_5
3. Enter layout mode and navigate to the Filters tab of the calendar layout. Read this section on calendar tabs if you're having trouble getting to the correct tab.
4. Duplicate (copy and paste) one of the existing filter fields on the layout and then switch this field to be FilterGlob_5. Format this field to use the value list you created in 2 above; format it as checkboxes if you'd like to support multiple selections.
5. Edit the script trigger for this field, keeping the script the same but changing the parameter to be the "number" of the field ("5" in our example).
6. Still editing the Filters tab of the Calendar layout, duplicate the "clear", "include", and "omit" buttons, placing them next to your new filter and change the script's script parameters for each of these buttons to use the "number" of the field ("5" in our example). Edit the conditional formatting for each of these to use the new filter number ("5" in our example).
7. Finally, edit the script "Load Calendar Settings - On Startup..." and find the comment "Maps filters to fields". Create a new SetVariable line for your new filter ($$sc_FilterField5 in our example) and, using your new field for the GetFieldName (GetFieldName ( SampleEvents::StaffName) in our example ).
8. Enter browse mode and run the Upon Opening script again and you're done. If you've added more than 5 filters, edit the script "Apply Filter to Found Set" and change the first variable there to be the number of filters you now have.
9. Edit the script "Clear All Filters" (new in v 5.551) and add additional SetField and SetVariable steps for your new filter fields.

Can I pre-filter the calendar so it starts up already filtered?

Yes, and this can be a great way to speed up the calendar if you have tons of events, but many are already "complete" or irrelevant.

Toward the end of the configuration script "Load Calendar Settings - On Startup --- Edit Configuration Here ---" you'll see a comment called "Pre-Filter the calendar if necessary". The next 4 lines set the two default filters that come with our calendar. The lines are currently disable: enable 2 or 4 of them if you have FileMaker Advanced, or recreate the two or four lines you need if you don't.

The first line (the Set Field) in each pair sets the value to be filtered ("Something" in our example), and the second line (the Set Variable) passes that filter into the calendar engine. Both lines in the pair need to be enabled, but you only need to edit the value in the first line of the pair ("Something" in our example).

(855) SEEDCODE
[email protected]
Follow us: