Currently when you save a query, the current values of the parameters become those parameters’ default values. While this is very simple, it’s also confusing:

  • It’s not clear to the user how to set default values.
  • If you happen to save a query for some other reason while also having the current values different than your real defaults, the default values update.

How about we add a dedicated setting in the parameter configuration dialog for the default value?

5 Likes

I like this idea. Would it be possible to automatically show the cached value using the default parameter values as well? Right now a query with parameters runs automatically whenever it is opened in the query editor. But if the parameters have a default value would it be possible to just load in the most recently cached version of the query that was ran with the default parameter value? For long-running queries this would make life a lot easier.

We already load a cached value if it’s available, regardless if you’re using default parameters or not. Also, if you schedule a query with parameters, we will execute it on schedule with the default values.

Would this also apply to multifilters? I would like to have the option to lock it to the filter setting it’s currently on when I save the query. For example I have multifilter platform for iOS and Android and I’d like it to default to choosing both, but it always defaults to only Android.

Unrelated, but if this is the case could we make Alerts work with parameterized queries? Right now Alerts aren’t supported on queries with parameters.

It’s a separate feature, technically. Parameters are passed to the database. Filters are handled in the browser. So a code change to parameters wouldn’t impact filters at all. You could open this as a separate feature request on the forum though :+1:

But there is no need, because this was requested many times before :slight_smile:

1 Like

Totally agree. Here is the most recent post making this request.

1 Like