# Expression tag syntax help

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531>\
**Category:** Ignition\
**Created:** [June 26, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531 "2023-06-26T15:14:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan\_mueller](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@dan\_mueller](https://forum.inductiveautomation.com/u/dan_mueller)\
**Post date:** [June 26, 2023, 3:14pm UTC](https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531/1 "2023-06-26T15:14:41Z")

</div>

Is it possible to assign a value to a tag based on a boolean in an expression tag?  
if second\_shift == 1:  
{[.]P1\_C\_Target} = 0

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 26, 2023, 3:16pm UTC](https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531/2 "2023-06-26T15:16:11Z")

</div>

Sounds like you should be using a tag change script instead.

---

<div class="post-metadata">

**Author:** ![dan\_mueller](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@dan\_mueller](https://forum.inductiveautomation.com/u/dan_mueller)\
**Post date:** [June 26, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531/3 "2023-06-26T15:21:00Z")

</div>

does ignition offer a one-shot? meaning it will only happen once when the tag changes

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 26, 2023, 4:05pm UTC](https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531/4 "2023-06-26T16:05:19Z")

</div>

> [@dan\_mueller](#):
>
> will only happen once when the tag changes

If you mean once for each change, then that's what tag change scripts do.

---

<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:** [June 26, 2023, 4:08pm UTC](https://forum.inductiveautomation.com/t/expression-tag-syntax-help/75531/5 "2023-06-26T16:08:42Z")

</div>

Sort of.

Tag change scripts run once per value change, timestamp change, or quality change, plus once during startup with a startup flag set (`initialChange`). The purpose of the startup event is for you to retrieve any state that would matter to you prior to that. The rest of the time, Ignition will give you one-shot behavior.
