Field filter searching with foreign keys


I have a minor annoyance that I'm not sure is something I can fix or if it needs to be a feature request.

I have one table with a column that a field filter is set up on, that works fine. This column is non-human readable IDs but is a foreign key to a different table and the second table has a third column with a nice human readable title so I've set it up using metabase's 'display foreign key settings' to display the value of that nice column.

This works perfectly and in the drop down filter box displays like Foreign Key title - long-ugly-id which is exactly what I want but I cannot search for the foreign key's title in the dropdown box only the actual value.

So assuming that the actual value is '4713713471347' and the nice human readable title from the foreign keyed table was 'Wibble' when using the display foreign key setting, the drop down box correctly shows the option Wibble - 4713713471347 and selecting that value works in the query but searching in the drop down box's search prompt for 'Wibble' will produce no results vs searching for '47137' which will work fine.

Ideally searching in the drop-down box would search both the actual value and the foreign keyed display value.

Is this something I've done wrong on my end or do I need to make a feature request on github? And apologies if this explanation was unclear.

I realise this was unclear so I will try to make it clearer with some examples (not real data, just simplified illustrations):

if I just set up a field filter on the column the drop down box would offer things like

  • 2824173547134
  • 3831845124865
  • 3432934954834

And would work fine but obviously not be the most readable thing in the world.

Now these IDs are also foreign keys to a different table and that other table has nice human readable names as well. Using metabase's inbuilt 'display foreign key value' feature (which is great, by the way) I can instead have the drop down box show something like

  • Wibble - 2824173547134
  • Title two - 3831845124865
  • Third thing - 3432934954834

And these work perfectly when selected by the tick box next to them. The annoyance is that the drop-down box offers a 'search the list' option but typing in this search box only searches the original ID (the ugly numbers) not the nice human readable title as well.

Hi @ametauser
Please post "Diagnostic Info" from Admin > Troubleshooting.

The version output is broken as an odd side-effect of our docker setup, but I can tell you it's version 0.42.0 or at least whatever lives at (I know it's a few versions out and I have some theories as to why it loses the version info)

"browser-info": {
"language": "en-GB",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36",
"vendor": "Google Inc."
"system-info": {
"file.encoding": "UTF-8",
"": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.14+9",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "",
"java.version": "11.0.14",
"": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.14+9",
"": "Linux",
"os.version": "4.14.268-205.500.amzn2.x86_64",
"user.language": "en",
"user.timezone": "GMT"
"metabase-info": {
"databases": [
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "14.2"
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.2.23"
"run-mode": "prod",
"version": {
"date": "?",
"tag": "vUNKNOWN",
"branch": "?",
"hash": "?"
"settings": {
"report-timezone": "Europe/London"

@ametauser Remapping is slightly complex. You should upgrade to 0.42.3.
I would recommend adding the Sample Database and using that as example.

Sounds like you are seeing this - upvote by clicking :+1: on the first post of each issue:
And you might also be interested in this:

Remapping is slightly complex. You should upgrade to 0.42.3.

I've been planning to do this for a while, will try and find the time tomorrow.

Sounds like you are seeing this - upvote by clicking :+1: on the first post of each issue:

These seem similar but perhaps not exactly the same. I'll try and knock up an example using the sample database when I get a chance.

Thanks for your help

This is how to get the same thing with the sample database as a starting point

Step one: set up the main table like this

Step two: set up one of the table's foreign keys to select by list of all items and to display as the foreign keyed tables' title column

Step three: set the title column in the other table to Entity Name

Step four: make sure this column is also set to 'a list of all values'

Step five: basic query with the fkey column as filter

Step six: the filters display properly as Title - id and work if selected but...

Step seven: when you search on the title field you don't get any results

Step eight: because searching is only for the original ID

Maybe I messed up somewhere with the types of columns or by setting both to be 'a list of all values'? It's desirable in this case to have a list rather than just the search box, but I'd also like users to be able to search by the human-readable title not the numeric ID.

Something else I found out from playing around with it: if I set the field to search instead of display list it works the way I want but doing this loses the list of values.

Step one: set relevant column to search (leave it as the fkey-display)

Step two: add as field filter

Step three: works like I want

And as a weird extra thing I noticed

Step four: but now searching by ID shows no results instead (I don't mind this)

Step five: but typing the numeric ID and clicking out of the filter box actually does find the relevant record even though the search said no results found.

@ametauser I've created an issue for it: - upvote by clicking :+1: on the first post

@ametauser I've created an issue for it:

Ok, thanks again for your help.