Advanced Techniques - Filtering with Boolean values

1. General

The workshop focuses on filtering tables by Boolean values. In the example application, tasks can be entered and then marked as completed or not completed. The table on the homepage can be filtered accordingly via the drop-down list.

2. Example application

You can download the example application here and import into your portal as usual.

3. Application structure




The images shows the edit page of the example application. This page contains an edit field for the task's title and a checkbox for marking the tasks as completed or not completed.



On the "All entries" page, the data records, which are displayed in the view table, can be filtered with a drop-down list. In the properties dialog of the drop-down list, the "First entry on list is blank" setting is active, to create a blank entry that deactivates the filter.



On the Entries tab, "Boolean (Logical value)" is selected as the data type of the saved value. The values in the drop-down list, i.e. the options for the filter, are defined here as user-defined values.



In the properties of the table, which is to be filtered, a corresponding dependency has been defined.



The filter drop-down list is defined as the control. The filter is triggered by the onchange event. It compares the value of the "Completed" field for each task with the value of the drop-down list using the "Equals" operator.

4. The application in the browser




You can see how the filter affects the task list in the table in the browser here.