How to design an advanced filter
This functionality demonstrates an advanced search based on several criteria.
Here’s how you build it:
View
- Go to the Data Masters palette and create a new “Data master”. Name it “Customers” and create three attributes: “Customer”, “Status” and “Reason”, then press “Ok”.
- Right-click on the “Data master” you’ve just created and select “View and edit records”, write your example data there, and press “Ok”.
- Select a “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” next to your “Data list”; go to the Properties palette and edit the values matching the “Reason” data field options.
- From the “Interactive input fields”, place a “Radio list” below your “Select”, and in the Properties palette, edit the values matching the “Status” data field options.
- Place two “Buttons” below your “Radio list” (Search & Clear).
Events
Select the “Search” button, go to the Events palette and click “Add event”.
- In the dialog box, click on “Choose Trigger”, hover over the “Mouse” section, and select “on Click”.
- In “Choose Action”, select “Set value to an element” and click on your “Data list”.
- Select the “Calculated” radio button for the value and click “Add expression”.
- Drag the function “Filter” in the builder’s first field; in the second field, drag your “Data master” from the Data Masters tab, next to the “Status” Data Master field and the function “Has” next to it, to finish, drag the “Radio list”. Click “Ok” and “Ok” to finish creating your event.
Go back to the Events palette and click the “+” to add a new event.
- In the dialog box, click on “Choose Trigger”, hover over the “Mouse” section, and select “on Click”.
- In “Choose Action”, select “Set value to an element” and click on your “Data list”.
- Select the “Calculated” radio button for the value and click “Add expression”.
- Drag the function “Filter” in the builder’s first field; in the second field, drag your “Data list”; next, pull the “Reason” data master field and the function “Has” next to it. To finish, drag the “Select”. Click “Ok” and “Ok” to finish creating your event.
Select the button “Clear”, go to the Events palette, and “Add event”.
- In the dialog box, click on “Choose Trigger”, hover over the “Mouse” section, and select “on Click”.
- In “Choose Action”, select “Set value to an element” and click on your “Data list”.
- Leave the value as “From current Data Master”. Click “Ok” to finish creating your event.
Simulate your prototype.