I’m currently trying to save a native query that has 10 optional filters but every time I save they seem to switch the order to a random display order which is quite frustrating from a usability perspective.
Example Query:
select *
from table
where column_1 = 0
[[and condition1 = {{condition1}}]]
...
[[and condition10 = {{condition10}}]]
order by date desc
limit 1000
I configure it all in order but then when i hit save, all the field widgets display in the following order.
2, 6, 1, 7, 5, 3 , 4, 9, 8, 10
This is rather annoying as I’m trying to have them display in the order that the columns are displayed to make it easy to understand without explanation.
Is there a work around or setting I need to change to fix this?
Which version of Metabase are you using? I remember this being an issue but that we shipped a fix for it a while ago. Incidentally, the next version of Metabase will also include the ability to click and drag to reorder filters on SQL questions and dashboards.
I am using the v0.31.2 and the drag and drop function doesn’t work.
In question view, I cannot drag and drop.
In dashboard view, I can drag and drop but it works not properly.
Do you fix this problem already?
@maz
When I drag in Firefox 64 (and Chromium 71), then it looks like it works, but when I release the mouse, I’m getting this error:
Uncaught TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at app-main.bundle.js?78262faa1c529a733077:5
at n.updateIn (vendor.bundle.js?78262faa1c529a733077:12)
at t.value (app-main.bundle.js?78262faa1c529a733077:5)
at n.setParameterIndex (app-main.bundle.js?78262faa1c529a733077:5)
at r.handleSortEnd (app-main.bundle.js?78262faa1c529a733077:5)
at e.handleSortEnd (vendor.bundle.js?78262faa1c529a733077:189)
Can confirm. Metabase 31.1, OS X (whatever the current prod release of Mojave is), any browser (Firefox, Chrome, Safari, Opera). This affects specifically variable input ordering within questions. It looks like they’ve inherited the UI assets indicative of drag & drop ability, but the actual changes to the question editor code necessary to make the “drop” reordering work have not been implemented.
EDIT: The old functionality of deleting all references to a variable, then re-entering it so that it appears last in the list does still work, but boy that can get tedious