Make a Toggle Filter from a Subquery Condition¶
This tutorial shows how to take a Subquery condition and turn it into a toggle filter. You need (1) a table and (2) a Subquery condition on the table model. In this example, we have a Contacts table, and a Subquery condition on the Contacts object that returns Contacts from Accounts in the Education industry.
Step 1: Set the Subquery Condition’s state to “Filterable Default Off”¶
- Click on the Subquery condition.
- Click State.
- Choose Filterable Default Off and create a condition name (this name won’t be displayed to users).
Step 2: Ensure that the Subconditions’ states are “Always On.”¶
Step 3: Click on your Table and then click Add Features > Add Table Filter.¶
Step 4: Choose Toggle as the Filter type and Label the filter then click to Add Conditions.¶
- Choose Toggle as the Filter Type.
- Create a label for this filter, i.e. Education. This is the label that users will see.
- Click to add a condition to this filter.
Step 5: Click on the new Condition, choose Activate, and select your condition from the list.¶
- Click on the new condition to modify it.
- For action, choose Activate. Because in Step 1, we chose to make this condition inactive, we want this filter to activate the condition when users click on it.
- Model Condition will display a list of all the conditions on your model with “Filterable” states. Choose the appropriate one (that you named in Step 1).
Step 6: Click Save, then click Preview.¶
Result: Your table will be displayed and the filter will be inactive.¶
Click on your filter to activate it.¶
Success! Only Contacts related to Accounts in the Education Industry are displayed.