How to Add Filtering to Calendar Menu

Introduction 

In this guide, you'll learn how to add filtering functionality to a Calendar Menu in Joget. Following the steps below, you can create a search form allowing users to filter calendar events based on specific criteria, such as the current logged-in user's ID. This enhances the user experience by showing only relevant calendar entries.

How does it work?

Adding filtering to the Calendar Menu involves creating a search form, adding it to the UI, and configuring the Calendar Menu to filter events based on the form inputs.

Create a Search Form

Create a new form and pre-populate the id with the current user's username. This will allow the Calendar Menu to locate the exact search value using the current Logged-in User's ID later on.

Add a form UI menu into UI 

Once the form is created, make it accessible to users by adding it to the application's UI as a Form UI Menu. In the "URL Redirect After Form Submission" field, input a unique Menu ID. This will redirect users to the Calendar Menu after submitting the search form.

The redirection process allows users to fill out the search form, submit it, and then view a filtered calendar based on their search criteria.

Configure the calendar to filter

Next, configure the Calendar Menu to filter events using the values submitted through the search form.

Utilize an advanced data store like the Advanced Form Data Data Store.

Under Filter Conditions, add rows to specify the fields you want to filter. Set the operator to Like to return matching values.

Use a form hash variable to obtain the search value from the form.

Sample Value
%#form.j_meetingsearch.title[{currentUser.id}]#%

Related documentation

Download sample app

Download the demo app for Add Filtering to Calendar Menu:
Created by Julieth Last modified by Aadrian on Dec 13, 2024