# Tag folder binding

**URL:** <https://forum.inductiveautomation.com/t/tag-folder-binding/64207>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 18, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207 "2022-09-18T21:37:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bfreeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfreeman/32/87436_2.png) [@bfreeman](https://forum.inductiveautomation.com/u/bfreeman)\
**Post date:** [September 18, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/1 "2022-09-18T21:37:41Z")

</div>

Hi,

I’ve noticed that it is possible to bind to a tag folder.

A tag folder binding seems to always return 2. I changed tags inside the folder but the binding is not recomputed.

Is there an actual purpose for tag folder binding?

Thanks

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 18, 2022, 9:52pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/2 "2022-09-18T21:52:20Z")

</div>

Can you show what you are referring to, maybe take some screenshots?

You tagged Perspective, so are the bindings on components within a View?

---

<div class="post-metadata">

**Author:** ![bfreeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfreeman/32/87436_2.png) [@bfreeman](https://forum.inductiveautomation.com/u/bfreeman)\
**Post date:** [September 18, 2022, 10:11pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/3 "2022-09-18T22:11:10Z")

</div>

I’ve setup a binding on the text prop of a label:

 ![Capture d’écran du 2022-09-19 00-07-08](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac53e3826567d1bd96d7fd9c94ba933db6ef0587.png)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 18, 2022, 10:40pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/4 "2022-09-18T22:40:55Z")

</div>

So Ignition doesn’t put you in a box, if you want to bind to an actual folder it will let you (as you see). But why did you try? What are you wanting to happen?

Why a folder returns a value of 2 isn’t something I know the answer to.

---

<div class="post-metadata">

**Author:** ![user77](https://avatars.discourse-cdn.com/v4/letter/u/a183cd/32.png) [@user77](https://forum.inductiveautomation.com/u/user77)\
**Post date:** [September 18, 2022, 11:14pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/5 "2022-09-18T23:14:20Z")

</div>

> [@jlandwerlen](#):
>
> Why a folder returns a value of 2 isn’t something I know the answer to.

I can't say I know the reason why, but this value will increase each time the folder is renamed, and your binding has been updated to reflect the new naming. It could be useful for change monitoring if it also incremented when tags were added or renamed within the folder, but it does not.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 18, 2022, 11:41pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/6 "2022-09-18T23:41:05Z")

</div>

Of course if you rename you just broke the binding.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 19, 2022, 12:12am UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/7 "2022-09-19T00:12:27Z")

</div>

> [@jlandwerlen](#):
>
> Of course if you rename you just broke the bindin

Lol, that was my first thought.  
I'm sure in other versions, binding to a folder returned the tags within as a json object with their tag values...

---

<div class="post-metadata">

**Author:** ![user77](https://avatars.discourse-cdn.com/v4/letter/u/a183cd/32.png) [@user77](https://forum.inductiveautomation.com/u/user77)\
**Post date:** [September 19, 2022, 12:43am UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/8 "2022-09-19T00:43:07Z")

</div>

I figured it would go without saying. I guess not. My original post has been edited for clarity.

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [September 19, 2022, 1:18am UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/9 "2022-09-19T01:18:01Z")

</div>

It’s presumably some kind of property of the folder. But since it’s not in the manual, I guess it’s best not to use this property, lest this return value change in the future.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [September 19, 2022, 3:21am UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/10 "2022-09-19T03:21:29Z")

</div>

I’m not 100% positive, but that `2` value could potentially refer to the Quality sub-code: `Good_WritePending`.

---

<div class="post-metadata">

**Author:** ![user77](https://avatars.discourse-cdn.com/v4/letter/u/a183cd/32.png) [@user77](https://forum.inductiveautomation.com/u/user77)\
**Post date:** [September 19, 2022, 4:25am UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/11 "2022-09-19T04:25:31Z")

</div>

This wouldn’t make sense if the bound value can increment by one on every rename.  
Please, give it a try yourself. You can reproduce by following the steps below:

1. Create a handful of custom value properties with bindings to folder names, say folders named 1, 2, 3, 4, 5, etc etc  
(It doesn’t have to be numbers, it can be anything you’d like as long as you have bindings to match the name you are going to change the folder name to.  
All these bindings will have data quality of Bad\_NotFound as the folders do not exist for any of bindings yet.)
2. Then create a tag folder and name it 1 (the binding value for this folder name will be 2)
3. Then rename that folder to 2 (the binding value for this folder name will be 3)
4. Then rename that folder again to 5 (the binding value for this folder name will now be 4)
5. Then rename that folder name back to 1 (the binding value for this folder name will now be 5) and so on and so on.
6. Delete the folder.
7. Create a new folder and call it 1 (the binding value for this folder name will be back to 2)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 19, 2022, 3:31pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/12 "2022-09-19T15:31:05Z")

</div>

> [@nminchin](#):
>
> I’m sure in other versions, binding to a folder returned the tags within as a json object with their tag values…

If you read the meta-node `jsonValues` of a folder, you get the values of the subnodes:  
`system.tag.readBlocking("[default]folder.jsonValues")`

```auto
>>> 
[[{
    "memory": 132,
    "opc": 4
}, Good, Mon Sep 19 08:29:11 PDT 2022 (1663601351271)]]

```

I suspect the `2` value is the [Configuration Version](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.20/com/inductiveautomation/ignition/common/tags/config/properties/RuntimeTagProps.html#ConfigurationVersion) property; you can read it directly and compare:  
`system.tag.readBlocking("[default]folder.cfgVersion")`

```auto
>>> 
[[2, Good, Mon Sep 19 08:30:45 PDT 2022 (1663601445536)]]

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [September 19, 2022, 7:34pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/13 "2022-09-19T19:34:32Z")

</div>

Are these folder props documented anywhere public?

---

<div class="post-metadata">

**Author:** ![bfreeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfreeman/32/87436_2.png) [@bfreeman](https://forum.inductiveautomation.com/u/bfreeman)\
**Post date:** [September 26, 2022, 10:19am UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/14 "2022-09-26T10:19:00Z")

</div>

So in the end there is no actual purpose to bind on a folder, right?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [September 26, 2022, 1:50pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/15 "2022-09-26T13:50:41Z")

</div>

The question to you is what were you expecting by binding a folder?

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [September 26, 2022, 2:08pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/16 "2022-09-26T14:08:50Z")

</div>

I feel like it should be the same as binding to a UDT instance. Thats essentially a “folder” in its own sense?

All of the contained tags should return into the prop?

With the question of performance, you could bind to a 1 million tag UDT instance just as easily as you could a 1 million tag folder. But I can’t see the 2 every being nearly as useful to an end user as returning the values inside

EDIT: The more I think about it, the worse I think a 2 is to return. What if you accidentally are bound to a folder instead of a single tag and now 2 represents some incorrect state. At that point, if it didn’t return the contents of the folder, I’d almost it raise an exception?

---

<div class="post-metadata">

**Author:** ![bfreeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfreeman/32/87436_2.png) [@bfreeman](https://forum.inductiveautomation.com/u/bfreeman)\
**Post date:** [September 26, 2022, 8:16pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/17 "2022-09-26T20:16:58Z")

</div>

I was expecting the folder binding to recompute when a child tag is added, modified or deleted.

---

<div class="post-metadata">

**Author:** ![Cory.grube](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cory.grube/32/20476_2.png) [@Cory.grube](https://forum.inductiveautomation.com/u/Cory.grube)\
**Post date:** [September 26, 2022, 8:32pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/18 "2022-09-26T20:32:27Z")

</div>

> [@kgamble](#):
>
> EDIT: The more I think about it, the worse I think a 2 is to return. What if you accidentally are bound to a folder instead of a single tag and now 2 represents some incorrect state. At that point, if it didn’t return the contents of the folder, I’d almost it raise an exception?

My first thought too. If you bind a folder by mistake, you should get an overlay otherwise you might not notice you bound it wrong

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 26, 2022, 8:32pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/19 "2022-09-26T20:32:28Z")

</div>

> [@bfreeman](#):
>
> I was expecting

You probably should expect nothing. The fact that you get a version number surprising IA staff kinda suggests that reading folders was not an expected operation.

---

<div class="post-metadata">

**Author:** ![bfreeman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfreeman/32/87436_2.png) [@bfreeman](https://forum.inductiveautomation.com/u/bfreeman)\
**Post date:** [September 26, 2022, 8:47pm UTC](https://forum.inductiveautomation.com/t/tag-folder-binding/64207/20 "2022-09-26T20:47:20Z")

</div>

Yes, I know. I was just replying to @jlandwerlen regarding my initial expectation when I tried it out.

[Next page](https://forum.inductiveautomation.com/t/tag-folder-binding/64207.md?page=2)
