Using a Page Filter of the Aggregate Type on a List

Prev Next

Introduction

Let’s go over how to add a filter to a list. We will add our filter to the account list page in our example. The data type used for filtering will be our Aggregate.

Step-by-step instruction

1. Adding a Page Filter to the Account List Page

 In the header of the account list page, drag a "page filter" from the toolbox. Then, configure the component tab as follows:

Type: Aggregate
Data: Account

In Live mode, when you click on the filter, you now see the result of the query, which fetches all accounts.

2. Adding the option to clear the filter

You can also add the option to clear the filter by adding the value "All accounts" in the "All values label" field.

3. Configuring and Applying the Filter

After selecting our list in the structure, we add a behavior to apply our filter (applicable page filters). Then, select our "Account" Aggregate as the Type. For an aggregate-type filter, you must choose the 'id' field, which is unique.

4. Filtering by Related Data

Now, by selecting the value "Cosmodôme" from our dropdown menu, we see only the account with that name.

Note

It’s good to know that by clicking the filter button, you will also have the option to type the name you want to search for, rather than just using the dropdown menu. This happens automatically.

Additionally, you can filter the account list by the contacts of each account by setting the page filter to Aggregate type "Account" and selecting the "Account" type with the contact field in the applicable page filters of the account list.

Conclusion

Adding and configuring an Aggregate page filter for a list enhances data retrieval by allowing more refined filtering options. By customizing the filter to show accounts and their related data, users can easily manage and display specific information tailored to their needs.