I’m creating a custom block in html that will bring general information about a context device, but I don’t know how to access the tags of that device, I would like if someone can help me in this situation, the developed table is attached.
Hi @Lucas_Pinheiro !
To reference context variables in the Custom HTML Block, you’ll need to utilize JavaScript. Please see our documentation here.
In terms of referencing tags of a context variable device, please see our documentation here.
Additionally, here’s a thread which you may find helpful:
Please let us know if you have any remaining questions!
even with the documentation I am not able to display the device tag, could you give me a practical example?
Attached is an example application export that demonstrates this. The bundle includes:
- A device with two device tags corresponding to your screenshot
- A dashboard with …
- A device ID context variable with the “Include full device info in context” checked (the default value is the device included in the bundle)
- A Custom HTML Block with a basic table in place, plus the output of the full block input properties
Context variable values are only exposed to the block through a JavaScript API (not using our Handlebars rendering engine) so the inner HTML elements must be set via script, not inline in the HTML.
The Custom HTML Block does require some basic web development knowledge to work with. Hopefully this is enough to get you started. Unfortunately we cannot support writing the custom block for you beyond this initial starting point.
export-63eabef71a5a456775506571-1676330898752-forums4931.zip (2.4 KB)
thank you very much for your help, the content you provided me is more than enough for the project I was envisioning.