Customizing Filters

WorkWithPlus has different kinds of filters that can be used according to data visualization needs. 

The Challenge

In the Person´s list, the default filters that were added are the Dynamic Filters. The purpose of the Dynamic Filters is to select at runtime which filters are going to be used according to the end-user needs.

SelectionFeatures_img36

In addition to the filters already available, the customer wants to add the possibility to filter by new fields as follows:

SelectionFeatures_img37

Filter Multiple with Prompt

The customer wants to have the possibility to filter by more than one Company, selecting it from a prompt (as an option of the dynamic filters). To do this, WorkWithPlus provides the 'Filter Multiple'. This kind of filter allows end-users to select more than one item from a list or from a prompt.

SelectionFeatures_img44

Run the application to try the results at runtime.

Filter using fixed operators

Moreover, the customer needs to filter people’s birth date by using the following fixed operators:

  • Today
  • Last Month
  • This Month
  • Next Month

We'll use 'Filter with dynamic Operators' to achieve that requirement. Remove the current operators and add the new ones:

SelectionFeatures_img50

Implement it and run the application to try it:

SelectionFeatures_img50

Column Filter options

Go to PersonWW at runtime and analyse the Column Filters of First Name, Id, Hobby, and Gender.

As you can visualize, Id has a Range search box but First Name and Hobby has a single search box and a dynamic list, and Gender has a fixed list.

GridObjectsFilters_img01

The default values for each column filter options are configured in the WorkWithPlus settings.

To open these settings, go to the Preferences of the KB  --> Patterns --> WorkWithPlus

GridObjectsFilters_img02

We need all the "Varchar" columns to have a maximum of 5 items listed on the dynamic list.
To do this, go to the 'Filters' tab in the WorkWithPlus settings, select the "Varchar" data type, and set the property 'Data List Max Values' in 5.

GridObjectsFilters_img03

Go to the application at runtime and visualize the results:

GridObjectsFilters_img04

Summary

Well done! You should now be able to:

  • Add new Dynamic Filters
  • Add a new filter with Multiple Prompt Selection
  • Include Fixed Filters
  • Customize the Columns Filters