Dropdown Filter sometimes does not populated


We are running into the issue where sometimes our dropdown filter populates with our data, and other times it does not and turns into a text box.

Ya even i am facing the same issue . what may be the cause ?

I faced the same issues, the problem doesn’t lie with the metabase release but how you build the query.

In query editor finish the query with WHERE e.g. SELECT * FROM TABLE WHERE {{COLUMN}}

On the right side the variable bar will open.

  1. Add filter name
  2. Select “field filter” in variable type
  3. Select your column in “field to map”
  4. Select “Category” in Filter Widget type

The filter should work now. If it still doesn’t go to:

  1. Admin Panel
  2. Data Model
  3. Select Query Table
  4. Go to Your Column Name
  5. Convert Type to Category
  6. Select Filtering on the Field (to your requirement)

Let me know if problem still persists, the solution is pretty straightforward.

I did all that, and the problem still persists. We embed and share the link for the dashboard and the dropdown filter works 100%. But when we go to the metabase site itself and view the dashboard, sometimes the dropdowns act as text input boxes while other times they act like normal and all the values appear in a dropdown

Which Metabase version? And which database do you connect to?

I am on version 0.31.2 and we are connected to a mysql database

Does every single card that has a dropdown filter connected, uses the same Field Filter reference?
And the Field Filter reference is correctly defined in the Data Model?
Do you see anything in the browser console or Metabase log, when it does work correctly/bad?

Yes ever card is connected to the dropdown filter correctly using the same field filter. This is my Data Model i am using (see screenshot) and there are. And there are nothing irregular in the Logs when the data does not populate.

They will be dropdowns for me sometimes, and others they appear as a text input box like this.


Okay. I’ve been trying to replicate, but I cannot get it to show text input - every time it shows drop down.
Intermediate errors are the most difficult to hunt.

Which browser are you using?

You probably need to check the requests being made in the browser console (Network), when it works and doesn’t work.
When it works, you should see a GET request to /api/field/X, which returns an object where name_field>has_field_values=list and then right after, there should be another GET request to /api/field/X/values, which gets the values to display in the list.

EDIT: Heavily updated - clicked reply too quickly.

The logs for when the dropdown populates and when it does not are the exact same. No get request for api field in the logs or network. I also do not see anything in the network for my embedded dashboards where the dropdown filter works every-time. These screenshots are when i first load up the dashboard.

Edited: to separate the 2 screenshots


Which browser are you using?

You have to use the Developer Console in your browser (Chrome or Firefox) and go to the Network tab to see request data.

I am using Chrome, and in the network console there is nothing about fields only queries that were executed. Both when it works and when it doesnt

Do a CTRL+R (or CMD+R on Mac) to refresh the page - should override the browser cache.
Otherwise I have no idea what’s going on - or even how the dropdown gets populated, when it’s working.

Thanks i didn’t think to do a hard reload and clear cache, now i see in the network console that when the dropdown works then i see get values requests are there, but when the dropdown does not work the get values requests are not there at all. So it just not getting the data sometimes, do you know why that is?

could it have something to do with caching the field filters? This is what i see in the network console for our (i am assuming) initial database request when loading that view. 46%20PM


When you refresh, do you see anything in the console? Any errors/warnings that could relate to this.

Mine looks like this: "cache_field_values_schedule":"0 0 0 * * ? *"
But I’m pretty sure that has only something to do with when Metabase synchronizes.

I’m more interested in the following properties:

  • database_type
  • special_type
  • has_field_values

Maybe other properties could be interesting.
And then of course, there should be a GET request right after, which gets the values to populate the dropdown.

Also, the entire fingerprint would be interesting.

Sorry you will have to specify what you mean database type special type has field values and fingerprint. Here is all i see in the network when it does not work, and console only has a deprecated warning for redux.

The same place, where you found cache_field_values_schedule, you’ll have a lot of JSON data in that request.