# Store to tag history on previous value greater than current value? and no other situation?

**URL:** <https://forum.inductiveautomation.com/t/store-to-tag-history-on-previous-value-greater-than-current-value-and-no-other-situation/39806>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [October 19, 2020, 4:04pm UTC](https://forum.inductiveautomation.com/t/store-to-tag-history-on-previous-value-greater-than-current-value-and-no-other-situation/39806 "2020-10-19T16:04:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [October 19, 2020, 4:04pm UTC](https://forum.inductiveautomation.com/t/store-to-tag-history-on-previous-value-greater-than-current-value-and-no-other-situation/39806/1 "2020-10-19T16:04:04Z")

</div>

Through Tag history, is there a way to only sample a value when it is less than the previous value?

So say, a int tag is at 7521 and goes to 1. I want to store 7521 with a timestamp, not the timestamp of: 7520 or 1.

I am trying to put this into my UDT. Not use a transaction group of some sort or on change events… If possible.

Thanks!
