How to filter columns in a data list

In this example, you will learn how to use the filter function to filter the values in a data list using a select list in the header.

Here’s how you build it:

View

  • Go to the Data Masters palette and create a new “Data master”, name it “Cars,” create tree attributes: “Manufacturer”, “Year” and “Color”, then press “Ok”.
  • Right-click on the “Data master” you’ve just created and select “View and edit records,” write your example cars there and then press “Ok”.
  • Select “Data list” from the “Dynamic content” section and place it on the canvas; the “New Data List” window will be enabled; give your list a name, next choose the “Data master” you have created before and select all the attributes.
  • Place a “Select” from the “Interactive input fields” section inside the header of the column you want to filter; press command (Mac) or control (Windows) while dragging the element inside.
  • Click on the “Select” and edit the values from the Properties palette to match the option you have in your column.

Events

With the “Select” selected, go to the Events palette and click “Add Event”.

  1. Click “Choose Trigger” in the dialog box and select “on Change”.
  2. In “Choose Action”, select “Set value to an element” and click on the “Data list”.
  3. Select the “Calculated” radio button for the value and click “Add expression”.
  4. In the value expression builder first field, drag the function “Filter”, and select your “Data master” from the Data Masters tab for the second field. Next, pull the function “Has” and choose the area you will filter from the Data Masters tab; next, drag the “Select” and place it in the last field. Click “Ok” and “Ok” to finish creating your event.
Note: You can replicate the actions for every column you want to filter.

Simulate your prototype.