# Tags in Input Control Blocks

**URL:** <https://forums.losant.com/t/tags-in-input-control-blocks/4525>\
**Category:** Feature Request\
**Tags:** experience\
**Created:** [May 12, 2022, 1:52pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525 "2022-05-12T13:52:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisGM](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@ChrisGM](https://forums.losant.com/u/ChrisGM)\
**Post date:** [May 12, 2022, 1:52pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/1 "2022-05-12T13:52:05Z")

</div>

I have a request to allow Input Controls to reference Tags, instead of only attributes.

In our application, our workaround is to write the current value of some tags to attributes on the payload to display dynamic values on input controls. While this duplicates data unnecessarily, it also causes a slight issue between the time of the tag being set, and the next time the device state is set. (The last attribute value is the old value, not the new tag value, until the workflow runs and sets the attribute to the tag value).

---

<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:** [May 12, 2022, 2:47pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/2 "2022-05-12T14:47:12Z")

</div>

You already can use tags in input control blocks, provided you are utilizing [dashboard context](https://docs.losant.com/dashboards/context-variables/).

See the attached screenshot. This comes from a dashboard that utilizes a [device ID context variable](https://docs.losant.com/dashboards/context-variables/#device-ids) that also returns the full device object (illustrated by printing out the value in the help block). You can then reference the values of those tags in the input controls configuration, illustrated here by the min, max, and default values for the range slider component.

If there is some other use case that this doesn’t solve please let us know.

 ![Screen Shot 2022-05-12 at 10.44.12 AM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/f/fbf79c6d3a3155e95ecb75aeecfd5a92d95bd0e6.png)

---

<div class="post-metadata">

**Author:** ![ChrisGM](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@ChrisGM](https://forums.losant.com/u/ChrisGM)\
**Post date:** [May 12, 2022, 4:10pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/3 "2022-05-12T16:10:37Z")

</div>

Thanks @Dylan_Schuster,

Let’s say I am setting a recipient email address as a tag.

I then want to use the text input block, with a dynamic value, to show me the current email address (tag).

Is this possible?

---

<div class="post-metadata">

**Author:** ![ChrisGM](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@ChrisGM](https://forums.losant.com/u/ChrisGM)\
**Post date:** [May 12, 2022, 4:11pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/4 "2022-05-12T16:11:36Z")

</div>

I think I may have misunderstood.  
I will try the Static value now.

---

<div class="post-metadata">

**Author:** ![ChrisGM](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@ChrisGM](https://forums.losant.com/u/ChrisGM)\
**Post date:** [May 12, 2022, 4:17pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/5 "2022-05-12T16:17:35Z")

</div>

Thanks @Dylan_Schuster,  
That’s exactly what I was looking for!

---

<div class="post-metadata">

**Author:** ![ChrisGM](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@ChrisGM](https://forums.losant.com/u/ChrisGM)\
**Post date:** [June 15, 2022, 8:56pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/6 "2022-06-15T20:56:12Z")

</div>

Hi @Dylan_Schuster,

This tag behaviour is working well for the text fields.

How does this apply to something like a toggle?

Is there a way to set the static value of a toggle, by using a context tag?

Many thanks,

---

<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:** [June 15, 2022, 9:19pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/7 "2022-06-15T21:19:32Z")

</div>

For a toggle switch, that workaround I proposed will not work. Best I can come up with is if the tag’s default value is set as “1” or “0”, and you instead use a shrunken Range Slider input, min 0, max 0, step 1. Not the best but would get the job done.

---

<div class="post-metadata">

**Author:** ![Allan\_West](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@Allan\_West](https://forums.losant.com/u/Allan_West)\
**Post date:** [December 13, 2023, 2:25pm UTC](https://forums.losant.com/t/tags-in-input-control-blocks/4525/8 "2023-12-13T14:25:09Z")

</div>

@Dylan_Schuster This solution has been working for me, but isn’t reliably populating the boxes within the input controls widget.  
Sometimes the referenced tags will be visible in the boxes when the page loads, but often the boxes will be empty until the page is refreshed. Sometimes the page has to be refreshed multiple times before the boxes populate.
