# System.tag.configure creating a tag with Uncertain\_InitialValue

**URL:** <https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [August 28, 2020, 8:11pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178 "2020-08-28T20:11:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 28, 2020, 8:11pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178/1 "2020-08-28T20:11:53Z")

</div>

Hello all,

I have the following script that I run in the script console:

```auto
tagdict = {
'historyEnabled': True, 
'formatString': u'#,##0.00', 
'historicalDeadband': 0.05, 
'scaleMode': u'Linear', 
'historyProvider': u'Hist', 
'rawHigh': 4095.0, 
'opcItemPath': u'ns=2;s=PLC00.PLC00.P00_TnkLvl@Float', 
'historyMaxAgeUnits': 'HRS', 
'opcServer': u'ServerMain', 
'engUnit': u'Ft', 
'documentation': u'History Floating Point Tag', 
'dataType': u'Float4', 
'alarms': [{'setpointA': 7.0, 'notes': u'Floating Point High Alarm', 'priority': u'High', 'mode': u'AboveValue', 'name': u'High', 'inclusiveA': False}, {'setpointA': 2.0, 'notes': u'Floating Point Low Alarm', 'mode': u'BelowValue', 'name': u'Low', 'inclusiveA': False}], 
'historicalDeadbandStyle': u'Discrete', 
'sampleMode': u'TagGroup', 
'name': u'HistoryFloat', 
'engHigh': 10.0, 
'valueSource': 'OPC'
}
system.tag.configure("[Default]_TestImport",tagdict,'m')

```

When the tag gets created, it has Uncertain\_InitialValue. The only thing I can figure out is that when I create the tag with history **disabled** the value will come back in. This gateway is running 8.0.16. Has anyone else run into this behavior?

Thanks,  
Brandon

---

<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 28, 2020, 8:24pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178/2 "2020-08-28T20:24:05Z")

</div>

Your opcItemPath doesn’t look valid for Ignition’s OPC server (should have a device name in square brackets). What kind of server is “ServerMain” ?

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 28, 2020, 8:25pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178/3 "2020-08-28T20:25:02Z")

</div>

Oh ServerMain is the name of our connection to a TopServer. I can confirm that this path works fine if I use it when creating a tag via the GUI in the designer.

EDIT: Top Server is a third party OPC server.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [August 28, 2020, 9:47pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178/4 "2020-08-28T21:47:28Z")

</div>

I would run a system.tag.getConfiguration on it right after creating it, and then after correcting it, and compare the dictionaries.  
Something isn’t setting correctly on the creation.

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [September 1, 2020, 12:13pm UTC](https://forum.inductiveautomation.com/t/system-tag-configure-creating-a-tag-with-uncertain-initialvalue/38178/5 "2020-09-01T12:13:38Z")

</div>

For posterity. I found the issue:

‘historyMaxAgeUnits’: ‘HRS’

Should be -

‘historyMaxAgeUnits’: ‘HOURS’

Thanks for the help everyone!
