# Dashboards - Use context variable in device tag query

**URL:** <https://forums.losant.com/t/dashboards-use-context-variable-in-device-tag-query/491>\
**Category:** Help\
**Created:** [May 12, 2017, 5:45pm UTC](https://forums.losant.com/t/dashboards-use-context-variable-in-device-tag-query/491 "2017-05-12T17:45:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Ritter](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@Brian\_Ritter](https://forums.losant.com/u/Brian_Ritter)\
**Post date:** [May 12, 2017, 5:45pm UTC](https://forums.losant.com/t/dashboards-use-context-variable-in-device-tag-query/491/1 "2017-05-12T17:45:30Z")

</div>

I have a map on a dashboard that I want to have show a subset of my devices based on a device tag, let’s say it’s vehicleType with 2 possible values “car” or “truck”.

I also have a dashboard context string variable called {{ctx.string-0}}.

Under the map settings -\> Block Data -\> Device IDs / Tags dropdown, I can explicitly select `vehicleType=car` or `vehicleType=truck`, but I’d like to be able to specify something like `vehicleType={{ctx.string-0}}` so that I can change the subset of vehicles shown without having to leave the dashboard and change the map settings. Is there a way to do this?

---

<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:** [May 15, 2017, 3:23pm UTC](https://forums.losant.com/t/dashboards-use-context-variable-in-device-tag-query/491/2 "2017-05-15T15:23:36Z")

</div>

There is currently not a way to do this, but that’s an awesome idea. We are seeing a lot of interest in using tags as context variables, so it’s something we’ll be prioritizing as a near-term feature.
