# Keep track of tagPath when utilizing system.tag.readAll

**URL:** <https://forum.inductiveautomation.com/t/keep-track-of-tagpath-when-utilizing-system-tag-readall/24955>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 14, 2019, 2:16am UTC](https://forum.inductiveautomation.com/t/keep-track-of-tagpath-when-utilizing-system-tag-readall/24955 "2019-05-14T02:16:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [May 14, 2019, 2:16am UTC](https://forum.inductiveautomation.com/t/keep-track-of-tagpath-when-utilizing-system-tag-readall/24955/1 "2019-05-14T02:16:42Z")

</div>

Hi,

I am trying to write some script to pull certain tag parameters from all tags in my project.  
I have found that using system.tag.read in a for loop is pretty inefficient, and am trying to do the same thing using system.tag.readAll which seems much faster.

How can i write this in python such that the index of a list can be tracked to provide the tagPath for any tag that returns a certain value?

```auto
tags = system.tag.browseTags(path,recursive=True)
	
tagPaths = [tag.fullPath + ".HistoryEnabled" for tag in tags]
print tagPaths	

qvTags = system.tag.readAll(tagPaths)
histEN = [tag.value for tag in qvTags]
print histEN

```

So now i just need to find a way to get all tagPaths that are associated with a histEN item equal to 1.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [May 14, 2019, 5:37am UTC](https://forum.inductiveautomation.com/t/keep-track-of-tagpath-when-utilizing-system-tag-readall/24955/2 "2019-05-14T05:37:58Z")

</div>

Use zip()!

```auto
combined = zip(tags,qvTags)
for k,v in combined:
    print k.fullPath,v.value

```

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [May 14, 2019, 8:57pm UTC](https://forum.inductiveautomation.com/t/keep-track-of-tagpath-when-utilizing-system-tag-readall/24955/3 "2019-05-14T20:57:54Z")

</div>

Awesome thanks. Ended up using enumerate but i like zip better, will go back and change now. Cheers
