Is it possible to have a dropdown list with some id as value and a label for the display ?
For instance I want to filter by customer_id and want to display the customer's name
For now I can only do a list with label == value and so I filter with name and not id / ForeignKey. It doesn't look very robust
Also what does "Linked filters" do exactly ? I read the doc Linking filters in dashboards but it doesn't explain how the data is defined / linked ?
How can I defined the link between the filter ?
edit to Customer Id > Display values : I only see the option "Use Original Value"
edit to Customer Name > Display values > Use Foreign Key > ID
in a dashboard, add a filter and link it to a widget on field Customer Id
the filter still display Customer Id and no Customer Name
Also if it's only meta-data on table, how can I filter the value available in the dropdown ? for instance i have a deleted_at column and I want to filter out customer that are deleted from the dropdown in dashboard.
Are they a simpler way ? something like I do a query like that
select c.id as key, c.name as label from customer where ...
And in a filter I can select the query and tell the display label and the value to input into linked widget ?
Linked filter
For linked filters, have you read the documentation? Sometimes it is explained in a different way than the Learn tutorials
Yes i read it too
I don't get how to link filter. In the exemple how the city filter know how to filter city by state ?
Maybe it look for a field state_id in the city table ? what if I have a field state_name without FK instead of state_id in the city table ? or maybe we need to configure meta-data in the admin panel ?
The one button to "link filter" looks like magic.
I have the same problem. In my case I am using time series data and sometimes names are updated which makes it hard to use names as a filter. Only if there was a way to filter by id but show names as well.