Accessing a List of all Historical Tags

Hi everyone,

If there’s already an answer to this, I can’t find it. Is there a way to access (using scripting, preferably) a dynamic list of all historical data tags in a project?

At the moment I’ve put some scripting together to get some drop down boxes to select and display any historical tag already on a static list to an easy chart, but my issue arises where this list will need to be updated in the future when more tags are added.

I know this must be possible in some way, as I can see a list of all the tag paths when I select “Tag History” under the binding for ‘Tag Pens’ in the Easy Chart ‘Chart Configuration’ section, but I don’t want to have to manually update this list every time.

Any help is greatly appreciated!


What version of Ignition do you have?

In 7.7 this could be pretty easy with some new components and functions added.

In previous version, you could do this with the IA Labs Scripting Module.

SQLTag history data is stored in an external database. Perhaps you can write a database query to retrieve all the historical tag paths.

The version of Ignition I’m using is 7.6, but it turns out that the database actually stores a separate table containing every historical tag’s path.

Thanks for the tip off, I was overlooking the information stored in the database. All I had to do was a very quick and easy query to the table “sqlth_te” and store it in a list. I should note that the list was two dimensional (i.e. a table), so to use only the actual path string I had to select only the relevant column (code below):

tagList = system.db.runQuery("SELECT tagpath FROM sqlth_te")

for j in range(len(tagList)):
   #gives just the tagpath string (which I've also parsed using the split() function
	label = tagList[j][0].split("/")    

Thanks for the help folks! :thumb_left: