# Error while cumulative tags creation. Error- Expression left operand is null

**URL:** <https://forum.inductiveautomation.com/t/error-while-cumulative-tags-creation-error-expression-left-operand-is-null/41411>\
**Category:** Ignition\
**Created:** [December 11, 2020, 4:35am UTC](https://forum.inductiveautomation.com/t/error-while-cumulative-tags-creation-error-expression-left-operand-is-null/41411 "2020-12-11T04:35:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshad.gawande](https://avatars.discourse-cdn.com/v4/letter/h/bc79bd/32.png) [@harshad.gawande](https://forum.inductiveautomation.com/u/harshad.gawande)\
**Post date:** [December 11, 2020, 4:35am UTC](https://forum.inductiveautomation.com/t/error-while-cumulative-tags-creation-error-expression-left-operand-is-null/41411/1 "2020-12-11T04:35:10Z")

</div>

I want to increment value of one tag after every 1 minute with Boolean value condition of another tag, but I am getting below error.  
Error\_ExpressionEval(“Expression left operand is null.”)

I have written below expression into newly created expression tag and set execution rate Fixed mode- \>  
if(({[.]…/5 Mill Service PLC04\_S7 Analyzer TCP/E 158\_4 MCC2 Lubr\_Unit Rough\_Answer Line Pump 1 (KM)})=1 , ( (({[.]RunHrs }) +1 ) , ({[.]RunHrs}) )

if(Tag1 = 1, Tag2+1 , Tag2)

I just need to check if the Boolean tag value is 1 then increment the value of current tag by 1 else the the value would be same. I have written that tag expression on tag name RunHrs.

Boolean Tag -  
{[.]…/5 Mill Service PLC04\_S7 Analyzer TCP/E 158\_4 MCC2 Lubr\_Unit Rough\_Answer Line Pump 1 (KM)}

New Expression Tag -  
RunHrs

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 11, 2020, 12:21pm UTC](https://forum.inductiveautomation.com/t/error-while-cumulative-tags-creation-error-expression-left-operand-is-null/41411/2 "2020-12-11T12:21:14Z")

</div>

You can’t have a tag act on itself. Use a gateway timer script instead.

Example:

```python
runningTag = '[default]test/isRunning'
hrsTag = '[default]test/RunTime'

isRunning, hours = [tag.value for tag in system.tag.readBlocking([runningTag, hrsTag])]

if isRunning:
	hours += 1
	system.tag.writeBlocking([hrsTag], hours)
```

---

<div class="post-metadata">

**Author:** ![harshad.gawande](https://avatars.discourse-cdn.com/v4/letter/h/bc79bd/32.png) [@harshad.gawande](https://forum.inductiveautomation.com/u/harshad.gawande)\
**Post date:** [December 15, 2020, 8:05am UTC](https://forum.inductiveautomation.com/t/error-while-cumulative-tags-creation-error-expression-left-operand-is-null/41411/3 "2020-12-15T08:05:36Z")

</div>

Thanks Jordan,

I have tried it from Gateway timer but it was not executing properly after every 1 min of interval. So I have created one Expression tag and from that tag I have called script with fixed rate of 1 min. runScript(“script path.MethodName”)  
Its working fine now.
