# Disable Tag history on value condition

**URL:** <https://forum.inductiveautomation.com/t/disable-tag-history-on-value-condition/16182>\
**Category:** Ignition\
**Created:** [November 30, 2017, 6:55pm UTC](https://forum.inductiveautomation.com/t/disable-tag-history-on-value-condition/16182 "2017-11-30T18:55:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [November 30, 2017, 6:55pm UTC](https://forum.inductiveautomation.com/t/disable-tag-history-on-value-condition/16182/1 "2017-11-30T18:55:03Z")

</div>

Application is a laser micrometer UDP transfer of height and width values. I have expression tags with historian tied into SPC and tag history calculations. here is the expression for one of the tags:

```auto
if({[.]11001/DimY} > 0 && {[.]../Taymer/LineMoving}, 
forceQuality({[.]11001/DimY}, 192), forceQuality({[.]11001/DimY}, 600))

```

Simply forcing the quality to 600 does not exclude it from the SPC sample collection when the line is not running. What is a good way to disable the SPC samples when Line is not moving? Apologies if this belongs in the MES forum but I was hoping there would be a way to modify the expression here, Thanks.

---

<div class="post-metadata">

**Author:** ![mark.french](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mark.french/32/4781_2.png) [@mark.french](https://forum.inductiveautomation.com/u/mark.french)\
**Post date:** [December 1, 2017, 4:57pm UTC](https://forum.inductiveautomation.com/t/disable-tag-history-on-value-condition/16182/2 "2017-12-01T16:57:10Z")

</div>

Hi!

Have you taken a look at [our Knowledge Base article on this topic](https://help.sepasoft.com/docs/display/SKB/Automate+Sample+Collection+only+when+production+line+is+running)?

There are other ways to accomplish this, so if this KB approach doesn’t address your use case, drop us a line at [Support@sepasoft.com](mailto:Support@sepasoft.com).

Cheers,  
Mark
