# Expression tag PLC reference

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-plc-reference/104945>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 10, 2025, 12:21pm UTC](https://forum.inductiveautomation.com/t/expression-tag-plc-reference/104945 "2025-04-10T12:21:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [April 10, 2025, 12:42pm UTC](https://forum.inductiveautomation.com/t/expression-tag-plc-reference/104945/3 "2025-04-10T12:42:08Z")

</div>

You could also convert them to [case | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/logic/case) statements which are a bit easier to read.

```python
case(
    {[.]Line},
    "LineA", 1,
    "LineB", 2,
    "LineC", 3,
    "LineD", 4,
    "-"
)

```

Note that the original expression is inconsistent. In one case it returns a string, "-" and in all the others it returns an integer. This is likely to cause problems elsewhere. (My expression does the same as it's merely a conversion from switch to case.)

Tip: for future code questions, please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

_[View the full topic](https://forum.inductiveautomation.com/t/expression-tag-plc-reference/104945)._
