# Expression Tag like comand and writing a string

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-like-comand-and-writing-a-string/11314>\
**Category:** General Discussion\
**Created:** [March 4, 2016, 1:50pm UTC](https://forum.inductiveautomation.com/t/expression-tag-like-comand-and-writing-a-string/11314 "2016-03-04T13:50:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![boster281](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@boster281](https://forum.inductiveautomation.com/u/boster281)\
**Post date:** [March 4, 2016, 1:50pm UTC](https://forum.inductiveautomation.com/t/expression-tag-like-comand-and-writing-a-string/11314/1 "2016-03-04T13:50:36Z")

</div>

I am trying to do a like command on the first three digits of a int tag and output a string if true.`if({Root Container.Report Viewer 1.Suspect} like 210%, 'PaintLine',0)`

---

<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:** [March 4, 2016, 6:01pm UTC](https://forum.inductiveautomation.com/t/expression-tag-like-comand-and-writing-a-string/11314/2 "2016-03-04T18:01:34Z")

</div>

You can cast it to a string and use the left() function:

```auto
if(left(toStr({Root Container.Report Viewer 1.Suspect}),3)='210','PaintLine',0)
```
