# Expression Binding Syntax

**URL:** <https://forum.inductiveautomation.com/t/expression-binding-syntax/82864>\
**Category:** Ignition\
**Created:** [December 7, 2023, 8:58pm UTC](https://forum.inductiveautomation.com/t/expression-binding-syntax/82864 "2023-12-07T20:58:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brad\_Kloehn](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@Brad\_Kloehn](https://forum.inductiveautomation.com/u/Brad_Kloehn)\
**Post date:** [December 7, 2023, 8:58pm UTC](https://forum.inductiveautomation.com/t/expression-binding-syntax/82864/1 "2023-12-07T20:58:46Z")

</div>

I am using an expression to bind data to an objects status and I am getting the following error. I am using the hot keys on the side for operators and such, so I am lost to the issue.

fillingLineID = String  
sourceTank4X1 = INT  
tankDisplayed = INT

Syntax Error on Token: 'EQUAL' (Line 1 , Char 36)

with this syntax

```auto
if({Root Container.fillingLineId} = '1' && {Root Container.sourceTank4X1} = 2 ** ({Root Container.tankDisplayed} - 1), 1, 0)

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 7, 2023, 9:13pm UTC](https://forum.inductiveautomation.com/t/expression-binding-syntax/82864/2 "2023-12-07T21:13:04Z")

</div>

The `power` operator:

- Python: `**`.
- Expression language: `^`.

[https://docs.inductiveautomation.com/display/DOC81/Expression+Language+and+Syntax#ExpressionLanguageandSyntax-Operators](https://docs.inductiveautomation.com/display/DOC81/Expression+Language+and+Syntax#ExpressionLanguageandSyntax-Operators)

You copied the syntax from [my answer to your previous question](https://forum.inductiveautomation.com/t/issue-writing-value-to-tag-in-script/82745/3) but that was a script, not an expression.

---

<div class="post-metadata">

**Author:** ![Brad\_Kloehn](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@Brad\_Kloehn](https://forum.inductiveautomation.com/u/Brad_Kloehn)\
**Post date:** [December 7, 2023, 9:22pm UTC](https://forum.inductiveautomation.com/t/expression-binding-syntax/82864/3 "2023-12-07T21:22:21Z")

</div>

You're correct. Why did the error point to the first = sign instead of the \*\*syntax error?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 7, 2023, 9:29pm UTC](https://forum.inductiveautomation.com/t/expression-binding-syntax/82864/4 "2023-12-07T21:29:20Z")

</div>

I don't know other than the equality operation failed.

By the way, the expression interpreter is very accomodating of line breaks and comments so you can write them in a way that's easy to read.

```auto
if(
    // Ignore other lines.
    {Root Container.fillingLineId} = '1'    
    && 
    // Check the binary index ...
    {Root Container.sourceTank4X1} = 2 ^ ({Root Container.tankDisplayed} - 1),
    1, // Would 'true' be more appropriate here?
    0 // And 'false' here?
)

```

If you are able to use `true` and `false` then your expression becomes:

```auto
{Root Container.fillingLineId} = '1'    
&& 
{Root Container.sourceTank4X1} = 2 ^ ({Root Container.tankDisplayed} - 1)

```

... which will return a `true` if both statements are `true`.
