Field filter widget not working as expected

I have a table abc_delivery_records which has 5 columns.

id - int, primary key
delivery_date - date
station_code - varchar, null: false
delivery_mode - varchar, null: true
num_deliveries - int

I wrote a simple query like below.

SELECT station_code, COUNT(num_deliveries)
FROM abc_delivery_records
  [[AND {{station_code}}]]
  [[AND {{delivery_mode}}]]

The field filter widget was not visible for any of the filters applied.
I am running Metabase version 0.28.1 (latest I believe).

I followed the documentation here.
From admin panel I changed the columns’ type to Category.
Then I manually synced using database panel to make sure the changes take effect.

When I went back to my question, station_code category widget was acting properly.
But, delivery_mode widget was not acting as Category (no drop down menu) rather a Text Input widget (whose interaction with field filters I do not know and it was resulting in errors anyway).

When can this happen? What can I try out further? I do not know whether columns allowing NULL or not should have an impact (have provided the info in schema). Even though delivery_mode allows NULL, no record has any NULL value at present.
Thanks in advance.

PS : Thank you so much for allowing multi-selection in category widget dropdown options.
Love that feature.

at least part of what you are describing seems to be covered in that issue:

As I am still on 0.25 I can´t reproduce your issues but maybe you could add to the github description to give the metabase team more info to work on :slight_smile:

Ah, thanks Eva.
I am facing the exact same problem and have already tried what @cmann50 mentioned as fix.

Will add to the issue.

1 Like