# Magic to get attribute from tag

**URL:** https://forums.losant.com/t/magic-to-get-attribute-from-tag/4638
**Category:** Help
**Tags:** dashboard
**Created:** [July 12, 2022, 1:01pm UTC](https://forums.losant.com/t/magic-to-get-attribute-from-tag/4638 "2022-07-12T13:01:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Paolo\_Proxy](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@Paolo\_Proxy](https://forums.losant.com/u/Paolo_Proxy)
#### Post date: [July 12, 2022, 1:01pm UTC](https://forums.losant.com/t/magic-to-get-attribute-from-tag/4638/1 "2022-07-12T13:01:27Z")

</div>

Hi there,  
I am not sure if this is possible but in my use case I have now the user to select a device by a tag called shortname (instead of the confusing device id).  
I then want to display in the header where that device is located via some magic expression.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/9/99fb7a1a241452bb09972737c430091597997d78.png)

I don’t believe this is possible but would like to have a way to retrieve device info from a tag basically.

---

<div class="post-metadata">

### Author: ![Sebastian\_Turner](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/sebastian_turner/32/4024_2.png) [@Sebastian\_Turner](https://forums.losant.com/u/Sebastian_Turner)
#### Post date: [July 12, 2022, 2:03pm UTC](https://forums.losant.com/t/magic-to-get-attribute-from-tag/4638/2 "2022-07-12T14:03:46Z")

</div>

Currently, we do not return full device info from a device tag context variable because those resolve to _a set of devices_, not a single device (even though in your case this is just one device).

Our recommendation: use the human-readable name/location as the Device Name, add a tag for whatever identifier you’re currently using as the device name, and then tag each device with the appropriate value.

---

<div class="post-metadata">

### Author: ![Paolo\_Proxy](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@Paolo\_Proxy](https://forums.losant.com/u/Paolo_Proxy)
#### Post date: [July 12, 2022, 3:30pm UTC](https://forums.losant.com/t/magic-to-get-attribute-from-tag/4638/3 "2022-07-12T15:30:36Z")

</div>

Yes I saw that coming like a Tyson punch, I have a good reason not to change the device name because it is used to refer to the origin device from the other system.  
Anyhow not a big deal but lesson learned from future dashboards. 😅
