# Get Tag Paths for Tags with History

**URL:** <https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 17, 2023, 5:59pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609 "2023-10-17T17:59:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 17, 2023, 5:59pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/1 "2023-10-17T17:59:39Z")

</div>

I'm wondering if there's a way to use `syste.tag.browse()` to find the paths to all of the tags that have history configured, or find the paths to all of the tags that have a specific parameter called out.

Not seeing anything in the filter key table that seems particularly helpful, but maybe something [else] would work that I'm not thinking of?

TIA

I can see the tag attributes if I just use browse with the script console:

```auto
'attributes':[history]

```

But I don't know how to check non-null (or a set) here

Maybe a combination of `system.tag.browseHistoricalTags()` and `syste.tag.browse()`?

---

<div class="post-metadata">

**Author:** ![aaronrai24](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aaronrai24/32/87248_2.png) [@aaronrai24](https://forum.inductiveautomation.com/u/aaronrai24)\
**Post date:** [October 17, 2023, 6:08pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/2 "2023-10-17T18:08:54Z")

</div>

I think this is a good case to use the [Tag Report Tool](https://docs.inductiveautomation.com/display/DOC81/Tag+Report+Tool), but it seems like there are also some scripting options given in this [forum post](https://forum.inductiveautomation.com/t/list-of-all-historical-tags/66594/12)

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 17, 2023, 6:11pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/3 "2023-10-17T18:11:28Z")

</div>

Eventually will try and use this list with `system.tag.configure()` so it would be much more useful to have the list in a script than using the Tag Report tool.

---

<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:** [October 17, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/4 "2023-10-17T18:17:48Z")

</div>

The tag report tool has a scripting equivalent. The gui tool will even write a script for you with the filters chosen.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 17, 2023, 6:23pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/5 "2023-10-17T18:23:57Z")

</div>

Well isn't that neat.

How would I go about excluding tags that are inherited from the parent UDT?

---

<div class="post-metadata">

**Author:** ![msteele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/msteele/32/77889_2.png) [@msteele](https://forum.inductiveautomation.com/u/msteele)\
**Post date:** [October 17, 2023, 6:48pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/6 "2023-10-17T18:48:31Z")

</div>

It would be quite cool if someone built a Perspective component to replicate the tag report tool 😉

@amarks just uncheck "Include UDT Members" under the Configure Tag Report left pane.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 17, 2023, 6:52pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/7 "2023-10-17T18:52:36Z")

</div>

But I do want to include UDT members. Just no the inherited ones.

For instance:

UDT 1 has a member "output" that has history.  
UDT 2 's parent type is UDT 1, so output is included and has history, but it shouldn't be included in the list because UDT 1 is included.

---

<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:** [October 17, 2023, 7:01pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/8 "2023-10-17T19:01:27Z")

</div>

> [@amarks](#):
>
> would I go about excluding tags

I'd post-process the results, looking at the typeId's returned.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [October 17, 2023, 7:25pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/9 "2023-10-17T19:25:27Z")

</div>

If for some reason tag report tool doesn't do exactly what you're needing, the only other way I have found to do this is to use a combination of `system.tag.browse()` and `system.tag.read*()`. You can specify the attribute that you are looking for in the path. so something like

```auto
tagPath = result.tagPath + ".history"

```

would do the trick. This way you can get results for tags that do not have history enabled, since the other options only return non-default values.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 17, 2023, 7:29pm UTC](https://forum.inductiveautomation.com/t/get-tag-paths-for-tags-with-history/80609/10 "2023-10-17T19:29:36Z")

</div>

~~Seems like I can't get to the parameter at the UDT definition level using `system.tag.browse()`~~

I can get it if I do it like so:

```auto
path = '[default]_types_/UDTs/ScaleSignal_2SPFailAlm/Parameters'

#system.tag.browse(path)
system.tag.browse(path, {'name':'*Storage_Provider*'})

```

However, the filter doesn't seem to have any effect on the results and all parameters are returned.

But this requires the full path directly to the parameters and the path doesn't support wildcards, so doesn't really help.
