# Showing Device Tag in the Block Header Text of Device State Table

**URL:** <https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320>\
**Category:** Help\
**Tags:** dashboard\
**Created:** [November 3, 2023, 3:56am UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320 "2023-11-03T03:56:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Santoso](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_Santoso](https://forums.losant.com/u/David_Santoso)\
**Post date:** [November 3, 2023, 3:56am UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/1 "2023-11-03T03:56:47Z")

</div>

Hi, I want to display some of the device tags in the Block Header Text of Device State Table, and if possible have these device tags added to the csv downloaded file. Is there a way to do that?

---

<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:** [November 3, 2023, 2:50pm UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/2 "2023-11-03T14:50:13Z")

</div>

Just to make sure I understand - you are asking if the values of tags returned for devices matching the Device State Table’s device query can be displayed in the block’s header?

 ![Screenshot 2023-11-03 at 10.43.51 AM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/6/681c659aacdce27344994e393b9502319c2d57c7.png)

Those results are not directly available in the block header; bear in mind that this block can display data for multiple devices matching given IDs and/or tags - so the question would then become, which device and which tag to display.

Now, I said “not **directly** available” because, if you are using [context variables](https://docs.losant.com/dashboards/context-variables/) in your dashboard, you can reference those values within the block header.

For example, given a [device ID variable](https://docs.losant.com/dashboards/context-variables/#device-ids) with the “Include full device info in context” option selected, you could display a tag value for that device in the block header using the following syntax:

```auto
{{ctx.VARIABLE_NAME.tags.TAG_NAME}}

```

 ![Screenshot 2023-11-03 at 10.49.05 AM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/a/ab901eea38def615916a05b6fd1480f48cac580c.png)

---

<div class="post-metadata">

**Author:** ![David\_Santoso](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_Santoso](https://forums.losant.com/u/David_Santoso)\
**Post date:** [November 12, 2023, 3:39am UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/3 "2023-11-12T03:39:17Z")

</div>

Hi @Dylan_Schuster, thanks for the tips! I was able to display a tag value in the block header using the syntax you provided. However, when I downloaded the data as a CSV file, it was named ‘DASHBOARD\_NAME-ctx\_device\_id\_0\_tags\_TAGNAME.csv’ instead of including the tag value in the file name. Is there a way to include the tag value in the file 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:** [November 13, 2023, 1:20pm UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/4 "2023-11-13T13:20:00Z")

</div>

I see what you mean; it’s not resolving those context variable values when building the CSV file name. I’ll file a ticket and see if we can get that resolved. Thanks.

---

<div class="post-metadata">

**Author:** ![David\_Santoso](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_Santoso](https://forums.losant.com/u/David_Santoso)\
**Post date:** [November 14, 2023, 6:35am UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/5 "2023-11-14T06:35:37Z")

</div>

Thank you! Please kindly let me know once the issue is resolved.

---

<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:** [December 16, 2023, 12:31am UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/6 "2023-12-16T00:31:17Z")

</div>

@David_Santoso just letting you know that a resolution for this went out in our [Thursday release](https://www.losant.com/blog/platform-update-app-import-improvements-and-async-functions). We’re now resolving the current context variable values when generating an export CSV now.

Thanks for the detailed report and let us know if you have any questions!

---

<div class="post-metadata">

**Author:** ![David\_Santoso](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_Santoso](https://forums.losant.com/u/David_Santoso)\
**Post date:** [December 17, 2023, 12:48am UTC](https://forums.losant.com/t/showing-device-tag-in-the-block-header-text-of-device-state-table/5320/7 "2023-12-17T00:48:58Z")

</div>

Hi @Dylan_Schuster, this is awesome. Thanks so much!
