Empty strings don't work with filters
So apparently, empty strings don't work with Yellowfin's filter system.
- They are never included in cached filter values
- When not using cached filter values, empty strings will appear as an option in the "Search Values" filter feature
- This means they can be selected by users (but can only be selected if another value is also selected for "in list") however they are never used in the SQL queries
- If no other filter values are selected, the "Search Values" will always display the empty string as selected (if values have been selected, then deselected)
Seems Yellowfin starts with an idea that a filter is null, then comma separated strings once set, then if ever unset is left as an empty string rather than returning to null. At least for "in list" filters. And because Yellowfin now expects empty strings in filters to be nothing (omitted filter), the SQL compiler (correctly) ignores empty filter values. Empty strings and null values are the same as far as the SQL compiler is concerned when it comes to filters.
This created a very weird situation today when one of our users was wondering why a number of rows were missing from their report. Turns out they added a filter, opened up the values, and selected them all. Because an empty string is one of the expected values, but doesn't work with filtering at all, all the rows with an empty value in that field were being excluded from the report.
Sure, they could have used the "is empty string" filter option, with an "or". But that massively complicates report creation, when report creation is meant to be a simple process in the first place, and this is obviously a bug.
So would it be possible for this to be fixed? Not just by removing empty strings from "Search Values" but by actually providing full support for empty strings in filter values.
And maybe, while you're at it, allow null values to be cached and selected? They could both be easily displayed both in filter values and maybe even in reports by adding an italicised and off-color "(empty)" and "(null)". Special SQL logic will need to be applied to handle null values, but this is really important!
Thanks for listening.