# Tag binding with expressions

**URL:** <https://forum.inductiveautomation.com/t/tag-binding-with-expressions/27360>\
**Category:** Ignition\
**Created:** [August 12, 2019, 1:42pm UTC](https://forum.inductiveautomation.com/t/tag-binding-with-expressions/27360 "2019-08-12T13:42:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawei.liu](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dawei.liu](https://forum.inductiveautomation.com/u/dawei.liu)\
**Post date:** [August 12, 2019, 1:42pm UTC](https://forum.inductiveautomation.com/t/tag-binding-with-expressions/27360/1 "2019-08-12T13:42:57Z")

</div>

Hi,

For UDT tags bind with expressions. From the user manual, I saw it only support one expression bind such as “if” or “switch”. It seems that all judgement or conditions shall be implemented in a single sentence.

So how could we implement more than one expressions judgement for a tags bind like a C or python function call？

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [August 12, 2019, 3:54pm UTC](https://forum.inductiveautomation.com/t/tag-binding-with-expressions/27360/2 "2019-08-12T15:54:53Z")

</div>

Take a look at [runScript](https://docs.inductiveautomation.com/display/DOC80/runScript). Also note you can nest expressions to achieve fairly complex logic, though this is usually more readable on complex logic if you break it up into expressions on custom properties that are then used in the final expression.

---

<div class="post-metadata">

**Author:** ![dawei.liu](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@dawei.liu](https://forum.inductiveautomation.com/u/dawei.liu)\
**Post date:** [August 13, 2019, 12:54am UTC](https://forum.inductiveautomation.com/t/tag-binding-with-expressions/27360/3 "2019-08-13T00:54:17Z")

</div>

@witman  
Thanks for your help.  
In fact, I created a lot of custom properties as a workaround for the one sentence limitation in expression.  
I will try to use runScript as you suggested.

---

<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 13, 2019, 11:45am UTC](https://forum.inductiveautomation.com/t/tag-binding-with-expressions/27360/4 "2019-08-13T11:45:23Z")

</div>

> [@dawei.liu](#):
>
> for the one sentence limitation

Note that expressions can have line breaks at any operator or parenthesis. Organizing nested expressions on multiple lines with some indenting can mitigate the apparent complexity.
