Dynamic Dropdown Filtering - include all option

Hi All,

I am hoping someone can help me with something. I am using a dynamic dropdown to filter a graph and table. I want to include a dropdown option ‘All’ that defaults to all options in the dropdown included.

I am able to include the ‘all’ as an option in the dropdown, but I’m not sure how to correspond the ‘all’ to overwrite the condition in the server connect database query. Hope someone can help and thanks in advance.

Is the value in the table numeric or a string?

1 Like

This tutorial uses a text field to filter the data, but the rest may be of use to you: Filtering Database Query with a Text Input.

If this is of no help, please come back here with a link to the remote location of the page.

1 Like

Hi @wahlrab,
First make sure the ‘all’ option value doesn’t have a value:

<option>All</option>

Then in the filtering options of the query builder, add a Group and then add it there. Put your select menu GET variable as a condition (the same expression you are using for the filter):

This means that the filter will only be applied if the select menu returns value, otherwise all the results will be displayed.

2 Likes

Perfect, that works just as I wanted. Thanks for your help.

1 Like