Locked Parameter using Drill through

I have created a Drill-through to a dashboard. Drill through passes parameters and those parameters act as a filter. I want to use the locked filter value from current dashboard in the drill through dashboard. Is this possible in Metabase?

Hi @RehanUlHassan
I’m not sure I understand. Are you using Embedding? If so, then drill-through only works on Enterprise Edition.
When you use locked filters, then those filters are controlled by your embedded code.

Alright,I have created a drill-through in the embedded dashboard and I want to pass locked filter along with the drill-through parameter to another dashboard. I can pass the filter to other dashboard as a parameter but that filter is not locked in the other dashboard and user in other dashboard can change the filter, which I wanted to be locked in the first place.

Thanks a lot for your response.

@RehanUlHassan
Which version of Metabase?
I don’t understand what you mean by passing the parameter to another dashboard via drill-through. How are you doing a drill-through from one dashboard to another dashboard?
Perhaps post your code or a screencast of what you’re trying to do.

I have downloaded Latest release
This:
http://localhost:3000/dashboard/34?category={{Sex}}

This parameter ‘Sex’ was locked in the dashboard and I am sending it as a parameter to another dashboard but there user is able to edit the ‘Sex’ from the filter…
or is there any way i can hide the filter from a dashboard?

@RehanUlHassan
I don’t know when or where you’ve downloaded it, so that’s why I’m asking for a specific version.
And the URL you’re posting is not an embedded URL - that’s just the Metabase interface.
When using the regular interface, there’s no locked parameters like with Embedded, so you cannot hide filters.

I am using version v1.33.4.1
And there is no workaround for that?
i.e. hiding filters from users?

@RehanUlHassan
Okay, so you are using the Enterprise Edition - good to know.
If you’re making a Full App Embedding, which it sounds like, then I don’t think it’s possible.
If you only make embedded dashboards, then you can lock the parameter of both dashboards, but then you would be able to link between the dashboards with the parameter included.
But you should ask support[at]metabase.com, since you’re using the Enterprise Edition - I don’t know if that functionality is coming in a future version.

Okay.
I use NodeJS as the backend server.
So you are saying to pass the parameter between two locked dashboards? right?
I think that link is encrypted through JWT? right?

@RehanUlHassan
If a parameter is locked, then it can only be controlled by your code.

1 Like

Sorry to bother you this much but do you know how can I get the parameters that drill-through passes to a link in my back-end server?
Any API or anything provided by metabase?

@RehanUlHassan
The embedded version can get data from/to Metabase via the postMessage javascript API:
https://www.metabase.com/docs/latest/enterprise-guide/full-app-embedding.html#setting-things-up-in-your-web-app
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

Thank you so much @flamber.
I was able to do it by sharing both dashboards with locked parameters and managing it through my own web app (using separate routes and passing parameters to them).

If this helps anyone:
Every shared dashboard has to be considered as separate route in the node app and drill-through link would be that route, we send the parameter to the route and get it in the node app and pass it to the payload of iframe to generate graph with locked filter.

1 Like

@flamber Sir, Do you know where to start if i want to dig into metabase opensource backend development?

@RehanUlHassan I’m unsure what backend you’re referring to, but all the source is hosted on Github - most of it in this repo under ./src/:
https://github.com/metabase/metabase

1 Like

OK and any guidance for starting?

@RehanUlHassan I don’t understand your question. Metabase is about 50% Clojure (backend) and 50% Javascript/React (frontend), so you would have to be knowledgeable with those languages to play around in Metabase.

Thanks @flamber

@flamber Hi, I have another query… I am sharing multiple dashboards as iframes on a single webpage (Requirements say so). But it is very slow… most of the iframes are stuck on loading… and load after like 5mins… I have ensured that there is no resource/db issue as there was no querying to the database, Metabase is causing this delay??
Thanks In Advance!