Skip to main content
Kinetic Community

Filter Fields

The filter field properties (filterMappings) are used to map values from the data source to a Kinetic Schedule event.  The syntax used for the mappings will be dependent on the adapter used in the datasource connection.

Description

Filters provide a way to allow end users to display events or resources based on values that they select from a list of filterable criteria.  That list of filterable criteria is controlled with filter field mappings.  Filter mappings are a bit different than detail mappings because they can define the color events should be displayed in when the field value of the event matches the corresponding filter value.  So instead of a list of name/value pairs, the filter mappings are an ordered list of properties that define the filter name, the filter value, and the a list of colored filter values.

Take the following data source configuration snippet for instance.  The filter filed mappings are defined as follows:

"filterFields": [
    {
        "name": "Category",
        "fieldId": "1000000015",
        "values": []
    },
    {
        "name": "Status",
        "fieldId": "7",
        "values": [
            {
                "value": "Draft",
                "color": "lightblue"
            },
            {
                "value": "Scheduled",
                "color": "orange"
            }
        ]
    }
]
 

This code is building up a list of 2 filter fields, each with a name, the field or property on the data source where the value is retrieved, and a list of possible values that each correspond to a predetermined color.  

The name is simply a text label that represents the criteria of what the field value relates to.

The format of the fieldId property will be dependent on the adapter used in the event type connection.  Please find the specific adapter used in the event type connection to determine the proper syntax: Adapters.  In this example, the value references a field on the data source - in this case it is a field on a Remedy ARS Form.  This tells Kinetic Schedule to retrieve the record from the form that matches the event ID, and return the value of this field identified as the label used in the name property.

The values property is an array of properties that identify a list of possible values that should be displayed in a corresponding color.  The color will only be used when the events are being filtered on this filter mapping.  

Take a look at the filter mapping identified with the name "Status" in the listing above.  This filter mapping defines two values that will display events with specified colors.  When the data source is filtered on the Status filter mapping, all events that have a status value of "Draft" will be displayed in light blue.  All events that have a status value of "Scheduled" will be displayed in orange.  Events that have any other status value will be assigned a color by the system since it wasn't defined in the data source configuration.

Supported colors for filtered event values are the same as supported colors for data sources.  Color values may be any of the html hex colors in the range #000000 - #FFFFFF, or any of the standard css color names: http://www.w3schools.com/cssref/css_colornames.asp