# Manual Tag Update

**URL:** <https://forum.inductiveautomation.com/t/manual-tag-update/10636>\
**Category:** Ignition\
**Created:** [October 19, 2015, 9:05pm UTC](https://forum.inductiveautomation.com/t/manual-tag-update/10636 "2015-10-19T21:05:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt0](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@matt0](https://forum.inductiveautomation.com/u/matt0)\
**Post date:** [October 19, 2015, 9:05pm UTC](https://forum.inductiveautomation.com/t/manual-tag-update/10636/1 "2015-10-19T21:05:44Z")

</div>

I’m using memory tags to store values that are updated manually through a form. For example, say I have a tag for water pressure. A technician reads a manual gauge and enters the value on a form. When he submits the form, the value is written to the tag. The purpose is to use simple tags (and the tag historian) as an easy way of storing timestamp+value information for manually recorded data.

My problem is that any time the entered value matches the current value of the tag, the tag isn’t updated (the LastChanged timestamp doesn’t change), and the new data point isn’t stored in the tag history. I’ve changed the deadband to zero, but that doesn’t seem to help.

I’m sure I’ve just got a scanclass or something configured wrong, but is there any way to do this?

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://forum.inductiveautomation.com/u/Pat)\
**Post date:** [October 20, 2015, 12:18am UTC](https://forum.inductiveautomation.com/t/manual-tag-update/10636/2 "2015-10-20T00:18:13Z")

</div>

If you want to force the Historian to record a new value every time the scan class executes you can either set the Max time between records to 1 Executions or set the Historical Deadband to -1, but it doesn’t sound like that’s what you’re looking for.

Try using the system.tag.storeTagHistory function, that should give you what you are looking for.

---

<div class="post-metadata">

**Author:** ![matt0](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@matt0](https://forum.inductiveautomation.com/u/matt0)\
**Post date:** [October 20, 2015, 5:45pm UTC](https://forum.inductiveautomation.com/t/manual-tag-update/10636/3 "2015-10-20T17:45:26Z")

</div>

Thanks, Pat!

Yeah…storeTagHistory works; unfortunately, it doesn’t update the current value of the tag. I guess I’ll have to:  
[ul]  
[li]\> Check if the new value is the same as the current[/li]  
[li]\> If it is, call both writeTag and storeTagHistory[/li]  
[li]\> If not, call only writeTag to prevent duplicate values in the historian[/li][/ul]

Not pretty, but it works.

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://forum.inductiveautomation.com/u/Pat)\
**Post date:** [October 20, 2015, 8:01pm UTC](https://forum.inductiveautomation.com/t/manual-tag-update/10636/4 "2015-10-20T20:01:26Z")

</div>

Or, you could turn off the history on the tag and just use one function to write the new value to the tag with system.tag.write and store the value in the history with system.tag.storeTagHistory.
