Filtering a table using a select list, but wanting an "All" option

If I have a table with a column of values, some duplicated, I occasionally want to filter the table to a specific value, and I’m currently doing this through setting a Single Select control which is populated based on the unique list of values from the column I’m interested in filtering by.

This works great.

However, sometimes I want to see the whole table… and it seems I’m currently restricted to just selecting one of the values via the control. I tried to add a “*” option to the list, but that didn’t seem to work. I also tried to play with the “Blank” value to have it filter differently (i.e. show me all if the value is Blank), but this didn’t seem to work.

What would I use here as a selectable value to show my whole table again?

Thanks!

@Thomas_Robbs,

Two options that might work for you. Here’s a doc with both variants in separate sections. https://coda.io/d/Select-All_dThShGcGQc6/

Option 1
Convert the single-select into a multi-select, which then presents an option called “All”

Option 2
Use a single-select, but update the filter condition on your table to deal with the case where there’s no value selected in your single select.

In the picture below, Fruits is a table, and the single select on the canvas is a control named “FruitSingleSelect”

Thanks,
Hari.

7 Likes

Thank you @harisiva! I appreciate you providing both solutions. I may use the multi-select in some situations but the single select, Option 2, was the one I was looking for.

One follow-up question, for Option 2… is there a difference between using

Name.Matches(FruitSingleSelect)

versus

Name=FruitSingleSelect

?

I’m using the second and it seems to work - seems intuitive, but I can see how your option is more technically expressive and may deal with something I’m not hitting yet with respect to how the .Matches function works vs. the “=” approach.

Thanks again!

@Thomas_Robbs,

You’re welcome! Glad to know that both options could work for you in different situations.

matches() is optimized for any control type (from select lists to date ranges) whereas = is looking for exact equivalence. Whenever using controls, prefer matches. HTH.

Thanks,
Hari.

2 Likes

@harisiva Option 2 works brilliantly but using it removes the option for ‘Apply to new rows’ found in the table filters.

Can you suggest a work around for this?

Thanks
Tony