# Example of tag paths and values in system.tag.storeTagHistory function?

**URL:** <https://forum.inductiveautomation.com/t/example-of-tag-paths-and-values-in-system-tag-storetaghistory-function/16092>\
**Category:** Ignition\
**Tags:** ignition78, scripting\
**Created:** [November 22, 2017, 1:01pm UTC](https://forum.inductiveautomation.com/t/example-of-tag-paths-and-values-in-system-tag-storetaghistory-function/16092 "2017-11-22T13:01:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 22, 2017, 1:01pm UTC](https://forum.inductiveautomation.com/t/example-of-tag-paths-and-values-in-system-tag-storetaghistory-function/16092/1 "2017-11-22T13:01:16Z")

</div>

I’m exploring an alternative approach to solving my [previous question](http://forum.inductiveautomation.com/t/triggering-history-for-a-group-of-tags-when-one-member-changes/16091).

- My tags are in a UDT.
- I want to write all the UDT tags to the History Provider on change of the “Total” tag.

Can someone give me guidance on how to set the paths and values to reference my UDT tags in an valueChanged event script?

system.tag.storeTagHistory(“myHistoryProvider”, “myTagProvider”, “ **paths** ”, system.tag.read("**[.]Weight**"), “192”, **system.date.now()**)

i.e., What’s the simplest syntax for each of the **bold** items above? For example, how do I reference the Weight value in the same UDT?

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8a93554f1c259dd7525a67580d6acc23c1ad39e8.png)

Many thanks.

---

<div class="post-metadata">

**Author:** ![joostjojo](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@joostjojo](https://forum.inductiveautomation.com/u/joostjojo)\
**Post date:** [August 1, 2018, 2:05pm UTC](https://forum.inductiveautomation.com/t/example-of-tag-paths-and-values-in-system-tag-storetaghistory-function/16092/2 "2018-08-01T14:05:57Z")

</div>

> [@Transistor](#):
>
> implest syntax fo

I've the same problem ☹  
Now I set up transactions groups for eacht instance of an UDT manually.  
However this will log it to the database, it is not the way it is supposed to be.

1. I wasn't able to get a whole UDT in a transaction group (i did it manually for each instance now)
2. this isn't actual historic data, it will not be shown at a tree browse when having historical tags enabled.

my situation:

i have 2 tags:  
Tag A  
Tag B

Both are historic tags and both are only have to log when Tag A changes.

---

<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:** [August 1, 2018, 6:46pm UTC](https://forum.inductiveautomation.com/t/example-of-tag-paths-and-values-in-system-tag-storetaghistory-function/16092/3 "2018-08-01T18:46:15Z")

</div>

> [@joostjojo](#):
>
> this isn't actual historic data, it will not be shown at a tree browse when having historical tags enabled

This is what "DB pens" are for -- data in wide tables from transaction groups or external sources. Since there's no standardized format for such data, you have to implement your own tag drop event handlers that understand your DB structure.
