# Tag Status Rollup

**URL:** <https://forum.inductiveautomation.com/t/tag-status-rollup/55692>\
**Category:** Ignition\
**Created:** [February 3, 2022, 12:05am UTC](https://forum.inductiveautomation.com/t/tag-status-rollup/55692 "2022-02-03T00:05:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSandy](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dsandy/32/29409_2.png) [@DSandy](https://forum.inductiveautomation.com/u/DSandy)\
**Post date:** [February 3, 2022, 12:05am UTC](https://forum.inductiveautomation.com/t/tag-status-rollup/55692/1 "2022-02-03T00:05:55Z")

</div>

I must be missing something, this should be simple.

We have a UDT with an integer status tag calculated on the device. I currently have about 75 of those devices, but will end up with several hundred. The UDT also includes a parameter that categorizes the devices. What I’m trying to do is find the worst case status in each category. Pseudo code:

```auto
For each Instance in folder:
    category = Instance.parameter.category
    category_status = run some code here based on Instance.statustag.value

```

I can deal with all the code except for the “for each Instance…”, that part is throwing me for a loop. I figure there has to be a function or feature that allows me to find all the instances/tags in a folder and iterate through them.

Suggestions gratefully accepted.

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [February 3, 2022, 12:26am UTC](https://forum.inductiveautomation.com/t/tag-status-rollup/55692/2 "2022-02-03T00:26:57Z")

</div>

You can use system.tag.browse.  
[https://docs.inductiveautomation.com/display/DOC81/system.tag.browse](https://docs.inductiveautomation.com/display/DOC81/system.tag.browse)

This will go through each tag in “folder1”, you can filter the results to your liking.

```auto
paths = []
folder1tags = system.tag.browse(path = '[default]Folder1')
for folder1tag in folder1tags.getResults():
	paths.append(str("[default]Folder1/" + folder1tag['name']))

```

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [February 3, 2022, 12:27am UTC](https://forum.inductiveautomation.com/t/tag-status-rollup/55692/3 "2022-02-03T00:27:03Z")

</div>

> [@DSandy](#):
>
> there has to be a function or feature that allows me to find all the instances/tags in a folder and iterate through them

[system.tag.browse](https://docs.inductiveautomation.com/display/DOC81/system.tag.browse) or [system.tag.configure](https://docs.inductiveautomation.com/display/DOC81/system.tag.configure)?

Edit: @josborn beat me to it.
