# \[Solved\] Dynamic Dashboards

**URL:** <https://forums.losant.com/t/solved-dynamic-dashboards/388>\
**Category:** Feature Request\
**Created:** [January 29, 2017, 9:54pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388 "2017-01-29T21:54:17Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Tyr](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@David\_Tyr](https://forums.losant.com/u/David_Tyr)\
**Post date:** [January 29, 2017, 9:54pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/1 "2017-01-29T21:54:17Z")

</div>

Hi, Losant is really great IoT platform and I am very happy with all functionality which is providinng. But there is one thing which I miss a lot. Some kind of dynamic dasboards - one dashboard to serve many devices of same type.  
Example: I have 50 thermometers and I need to show a some overview dashboard ower all devices to simply visualize errors, alert states, etc. - that is simple and can be easily done. But I also need to have possibility to click in that dashboard to one particular device and open related dashboard with details for that device.  
Today I have to clone one dashboard n- times and manually change device in all widgets - nightmare while it is so easy to make mistake and have mixed devices in one dashboard.

I believe I am not only one requesting such feature. At least I would like to have possibility to export dashboard into file and be able to find replace device ids or tags.

Thank you

---

<div class="post-metadata">

**Author:** ![Justin\_R](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Justin\_R](https://forums.losant.com/u/Justin_R)\
**Post date:** [January 30, 2017, 7:11am UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/2 "2017-01-30T07:11:34Z")

</div>

I would really like to see that as well.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [January 30, 2017, 4:06pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/3 "2017-01-30T16:06:13Z")

</div>

We call this “Dashboard Context” and it’s under construction right now. It’s likely still a month away - there was a decent amount of UX work to get this seamlessly integrated into existing dashboard functionality while not being confusing.

---

<div class="post-metadata">

**Author:** ![David\_Tyr](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@David\_Tyr](https://forums.losant.com/u/David_Tyr)\
**Post date:** [March 8, 2017, 8:11pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/4 "2017-03-08T20:11:56Z")

</div>

Thank you for feature I like it. I have one question… How I can access device name or tags when context variable is device ID ({{ctx.deviceId-0}})? e.g. for displaying device name in description bar? I have noticed that in your help you are using variable {{ctx.deviceName}} but it doesn’t work for me.  
thank you

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [March 9, 2017, 4:09am UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/5 "2017-03-09T04:09:12Z")

</div>

In the example, `deviceName` is passed as an additional context variable. The example uses the [GPS History](https://docs.losant.com/dashboards/gps-history/) block, which provides the device’s name so you can customize the popup’s content. Since you have the device name and device ID there, you can link to a dashboard specific for that device and pass the name and ID as context variables.

At the moment, the device name is not automatically available when a device ID is configured as a context variable. It is something we did think about. It’s not a bad feature idea.

---

<div class="post-metadata">

**Author:** ![David\_Tyr](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@David\_Tyr](https://forums.losant.com/u/David_Tyr)\
**Post date:** [March 10, 2017, 4:35pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/6 "2017-03-10T16:35:54Z")

</div>

OK, understood. Device name, device description and device tags would be great to be able somehow describe displayed dashboard. I would also appreciate some possibility go from some general dashboard into context one like you doing with tiptool in maps. eg. click on standart widget will open url of context dashboard…

have a nice weekend

David

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [January 26, 2018, 3:54am UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/7 "2018-01-26T03:54:46Z")

</div>

Second vote for the features asked for by David. Further device details available within dashboard context.

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [February 7, 2018, 12:34pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/8 "2018-02-07T12:34:40Z")

</div>

Please clarify how one extracts device name from the context variables.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [February 8, 2018, 2:12pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/9 "2018-02-08T14:12:18Z")

</div>

Take a look at [this dashboard](https://app.losant.com/dashboards/596e5ad0374ba300074089c9), which displays data from a series of “weather stations” (set up similar to how you’ll find in our [walkthrough](https://docs.losant.com/getting-started/walkthrough/).

The part you care about is the map and list of stations in the left column, which are a [GPS History](https://docs.losant.com/dashboards/gps-history/) and [Device List](https://docs.losant.com/dashboards/device-list/) block respectively. In each of those cases, when we are querying for the data to display in the block, we are also returned the device name that corresponds to each ID.

Given that the dashboard has context variables “devId” and “devName”, we can then build links to other context states within the rendering config of each block. For the GPS History block, I’ve set my popup template to be:

```auto
##### **{{deviceName}}** 

[View Device]({{dashboardUrl ctx=(obj devId=deviceId devName=deviceName)}})

{{latitude}},{{longitude}}

```

And for the Device List, I’m configuring a custom URL for where the device name should link, and setting it to:

```auto
{{dashboardUrl ctx=(obj devId=deviceId devName=deviceName) }}

```

Please let me know if you need any further clarification!

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [February 8, 2018, 6:55pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/10 "2018-02-08T18:55:24Z")

</div>

Thanks. My dashboard is using a similar device list. Based on the weather station dashboard, it is not clear how you are customizing block headers on the right for each weather station name.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [February 8, 2018, 6:57pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/11 "2018-02-08T18:57:04Z")

</div>

If the context variable is `devName`, I am setting the title of my blocks to be, for example, “{{ctx.devName}} Current Humidity”. That will render the value of that context variable at the front of the block title.

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [February 8, 2018, 7:09pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/12 "2018-02-08T19:09:36Z")

</div>

The dashboard context does not allow me to define a context variable as device name.

?

 ![Capture](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/d3478d8377fada7e1b7dedb3e3429ff79ba7c16a.JPG)

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [February 8, 2018, 7:14pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/13 "2018-02-08T19:14:48Z")

</div>

Sorry, save it as the type “string”. Then you’ll populate it using the method I described earlier.

For the default value, set it to the name of the device you’re using as your default device ID (looks like “Paulina1” based on your screenshot).

---

<div class="post-metadata">

**Author:** ![WoobaGooba](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/woobagooba/32/507_2.png) [@WoobaGooba](https://forums.losant.com/u/WoobaGooba)\
**Post date:** [February 8, 2018, 7:30pm UTC](https://forums.losant.com/t/solved-dynamic-dashboards/388/14 "2018-02-08T19:30:27Z")

</div>

Sweet! All better now. Thank you.
