Get the name of the current container of an embedded dashboard
Hi everyone,
In a dashboard that I'm developing I have multiple dashboards embedded into one another.
Within one of the embedded dashboards I have a button that is associated to a dashbaord extender rule. When the button is clicked, I need the rule to retrieve the name of the dashboard that is currently the container of the embedded dashboard where the button is placed (see scheme below)
Primary dashboard
Embedded 1
Embedded 2
Embedded 3
-> button
I see there are two rules (args.PrimaryDashboard and args.EmbeddedDashboard) that allow to retrieve the name of the primary dashboard OR the name of the current dashboard (Embedded 3 in the example).
I need to retrieve the name of Embedded 2. I couldn't find any resource that explained if and how to do that.
Does anyone know how to do that?
Thank you
Hi fc
So it sounds like you are ultimately trying to identify the calling button?
If so there is an easier way... In the component service or dashboard extender br you can get the Name of the component calling the rule from DashboardExtenderArgs e.g to retrieve name property we would use
args.ComponentInfo.Component.Name
This will correlate to each of your buttons in your tabbed dashboard layout and you can pivot your condition based on this
If you want to reduce components you could approach this using dynamic dashboards and the same trick with retrieving the button properties via args
Hope this helps
Sam