What is the intended use of the “device tags” column in a dashboard data table? I noticed this option as I was looking for a way to put a single tag value next to every data row in data table. However, when I add a device tag column the default configuration shows up as empty in the preview. Is there a way to use Handlebars to pull out a specific tag? Apologies if there’s documentation on this, I looked through the data table page but didn’t see tags mentioned at all.
The device tag column does allow you to put one or more tag values in the table. Here’s an example I put together:
The raw value of the attributes is an object. In my case it’s:
{ "particleID": [ "45002e001951353338363036" ], "location": [ "terminal" ] }
You can see the raw data by making the template {{ format value }}
.
So as you can see I have a tag named “particleID” with a value that is an array. The values are arrays because you could have the same tag key multiple times. If that happens, each value is added to the array. The template then to display just the value of the “particleID” tag is:
{{ value.particleID.[0] }}
Maybe the issue is that {{format value}} is empty. I’m not exactly sure how my data maps to your example. Here’s how I have my data table defined:
and on the device properties page for the device I have these tags defined:
However, the data table doesn’t show anything for {{format value}}:
I also tried {{value.deviceType}} and {{value.deviceAlias}} with no luck.
Looks like we found the underlying cause. The tag values are properly displayed when looking at a duration other than “Last received data point”. When using last received, the tag values are not displayed. We’ll have a fix out asap.
Good to know, thanks for the update
A fix has been released. You should now be good to go. Thanks for bringing this to our attention!
Great, thanks! I was able to get the tag value I was looking for now