Varchar column is not shown for mapping to dashboard filter

Hi,

my table has a varchar column. I want to use the click behavior on one dashboard to pass this varchar value to another dashboard.

Problem is that in link to a dashboard under the sub-dialog Pass values to this dashboard's filters, the varchar column is not listed to be mapped! I tried to explicitly to cast the column in the query to ::varchar, but still it is not listed. Seems, that listed for mapping are only numeric values. The filter themselves is of type text.

Interestingly, when linking to a saved question all varchar columns are visible for mapping. But I would like to utilize linking to dashboard.

Any hint very welcomed.

David

Hi @Dave2
Post "Diagnostic Info" from Admin > Troubleshooting.
There are some specific cases, where it doesn't allow the mapping:
https://github.com/metabase/metabase/issues/15170 - upvote by clicking :+1: on the first post

Hi @flamber,

your linked issue is some different issues I have.

When creating two dashboards (source and target) with a query over sample people table
like

select *
FROM "PUBLIC"."PEOPLE"
where 1=1
[[and "NAME" = {{name}}]]
[[and  "CITY" = {{city}}]]

source dashboard has a filter "name " mapped to column name
target dashboard has a filter "city" mapped to column city

then it is not possible to pass city filed from source dashboard to target dashboard

The field city is just not listed as a possible choice.

I'm tried to change the semantic type of the underlying people table and changing the filter type, but nothing helps.

@Dave2 Because the City is a strange location type. Check your Field Type in Admin > Data Model > (db) > (table).

Adding info

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.16.1+1",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.16.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.16.1+1",
    "os.name": "Linux",
    "os.version": "5.10.102.1-microsoft-standard-WSL2",
    "user.language": "en",
    "user.timezone": "Europe/Prague"
  },
  "metabase-info": {
    "databases": [
      "postgres",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "14.5 (Ubuntu 14.5-1.pgdg20.04+1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.5.0"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-10-17",
      "tag": "v0.44.5",
      "branch": "release-x.44.x",
      "hash": "29fab4d"
    },
    "settings": {
      "report-timezone": "Europe/Prague"
    }
  }
}

I already changed to No semantic type

@Dave2 Yes, now recreate the filters on the dashboard, since the City was likely a "location" filter.

Dashboard filters recreated but still no fields there as option.

Btw. the filters are of type "ID". If I choose "text", then it is not possible even to map the filter field to the variables ({{city}} and {{name}}).

@Dave2 Try creating two questions instead of the same question. Something is making me think of https://github.com/metabase/metabase/issues/19122

Thanks @flamber . The issue in the link you provided may be related but I'm not cloning any dashboard.

Nevertheless I succeed with the pass through of a text field to a target report by setting the target dashboard filter type to Text or Category -> Drop down list

No idea why this helped but it works.

@Dave2 Because the ID filter type doesn't currently allow strings as I linked to initially in issue 15170.