> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/filter-and-search-a-team-calendar.md).

# Filter and search a team calendar

Add resource filters, record filters, a search bar and a side panel to the Avonni Calendar, so a dispatcher finds one technician's day in seconds.

A customer calls the dispatcher: is someone coming to Lakeview Clinic on Thursday? The screen shows three technicians and a full week of visits. With a technician filter, a filter on the event type and a search bar, the dispatcher narrows the calendar to one technician's Thursday, or types "Lakeview" and finds the visit.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F8200h5OEw0VrspQ7kUA3%2Fcalendar-filter-and-search-a-team-calendar-result.png?alt=media" alt="Team calendar on a Thursday with a left side panel holding a search box, a date picker, a Technician filter and a Type filter with Call, Meeting and Other"><figcaption><p>The side panel groups the search, the date picker and one section per filter.</p></figcaption></figure>

## Before you start

* A screen flow with an Avonni Calendar on a **Query** or **Variable** data source, with **Resource Name** mapped so each technician is a resource. See [Use a Query data source](/flow/tutorials/components/calendar/using-a-query-data-source.md).
* The fields you want to filter on must be on the object the calendar reads, for example the standard `Type` field of Event.

## Steps

{% stepper %}
{% step %}

### Name the technician filter

* In the Component Builder, open the **Properties** tab and expand **Filter**.
* The resources filter is on by default and lists every resource. **Hide Resources Filter** turns it off.
* In **Resources Filter Label**, replace the default `Resource` with `Technician`.
* **Hide Date Picker** stays off, so the dispatcher can jump straight to Thursday.
  {% endstep %}

{% step %}

### Add filters on event fields

* Open the event **Data Mappings** and select the fields in **Filters**, for example `Type`. Drag them to set their order.
* Back in **Filter**, **Use Record Picklist Values** only offers the values found in the loaded events, instead of every value of the picklist.
* **Use Cascading Filter Values** narrows the options of each filter to the events that match the others.
* At run time each filter is its own section, with a count next to every value (for example **Call (2)**) and a search box for long lists.
  {% endstep %}

{% step %}

### Choose where the filters sit

* In **Filter**, set **Type** to **Horizontal**, **Popover** or **Panel**.
* **Panel** moves the filters into the side panel, set up in the last step.
  {% endstep %}

{% step %}

### Turn on search

* Expand **Search** and turn on **Show Search**.
* In the event **Data Mappings**, select the fields to search in **Search Fields**, for example `Subject`. If you leave it empty, every filterable field is searched.
* **Placeholder** sets the hint text (default `Search`). **Position** places the bar: **Left**, **Right**, **Center**, **Fill** or **Panel**.
  {% endstep %}

{% step %}

### Set up the side panel

* The side panel appears as soon as the filters or the search are set to **Panel**.
* Expand **Side panel**: **Position** puts it on the **Left** or the **Right**.
* **Closed by Default** opens the screen with the panel folded. **Hide Toggle Button** removes the header button that opens and closes it.
* **Reset Button Label** renames the button that clears every selection (default `Clear all selections`).

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F6EMN8CxixheHielKG1Vv%2Fcalendar-filter-and-search-a-team-calendar-panel.png?alt=media" alt="Calendar properties with the Filter, Search and Side panel groups, Resources Filter Label Technician, Type Panel, Placeholder Search visits and Position Left" width="320"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Save and test

* Save the Component Builder, save the flow and run it in **Debug**.
* Pick Thursday in the date picker and one technician in **Technician**: only that technician's visits for the day remain.
* Clear the selections and type `Lakeview` in the search bar: the Lakeview Clinic visit is the only one left.
  {% endstep %}
  {% endstepper %}

## Troubleshooting

<details>

<summary>The technician filter does not appear</summary>

With a **Query** data source, the resources filter only appears when **Resource Name** is mapped and the calendar has resources. Check the mapping in the event **Data Mappings**. [Troubleshoot resources and missing events](/flow/tutorials/components/calendar/troubleshoot-resources-and-missing-events.md) covers the other causes.

</details>

<details>

<summary>The search bar is missing</summary>

**Search Fields** alone doesn't show the bar. Turn on **Show Search** in the **Search** group.

</details>

<details>

<summary>The filters are gone on a phone</summary>

The side panel is not shown on mobile, so filters set to **Panel** are not available there. Use **Horizontal** or **Popover** for a flow that runs on phones.

</details>

## Related tutorials

* [Color-code calendar entries](/flow/tutorials/components/calendar/how-to-color-code-calendar-entries-in-the-avonni-calendar.md): see the event types before filtering on them.
* [Troubleshoot resources and missing events](/flow/tutorials/components/calendar/troubleshoot-resources-and-missing-events.md): when a technician or a visit is missing.
* [Customize the time spans](/flow/tutorials/components/calendar/how-to-customize-time-spans.md): give the dispatcher a 3 day or 1 week view to search in.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/calendar/filter-and-search-a-team-calendar.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
