Variable Fields Reorganising after save (Native Query)


#1

Hey guys,

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?


#2

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. :+1:


#3

Currently using version v0.30.4

and that’s good to hear about the filters. That will make things much more versatile.