# Alarming expression

**URL:** <https://forum.inductiveautomation.com/t/alarming-expression/22231>\
**Category:** Ignition\
**Created:** [January 30, 2019, 6:42pm UTC](https://forum.inductiveautomation.com/t/alarming-expression/22231 "2019-01-30T18:42:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kunal.ghule](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@kunal.ghule](https://forum.inductiveautomation.com/u/kunal.ghule)\
**Post date:** [January 30, 2019, 6:42pm UTC](https://forum.inductiveautomation.com/t/alarming-expression/22231/1 "2019-01-30T18:42:56Z")

</div>

I’m trying to write expression in tags alarming label to assign label from its tag path. Using following expression  
try(split({displayPath},"/")[2,0],-1).

Same expression is working in normal text field container but in tag itself, it’s not working.

------Reason for expression.---------  
I’m trying to give label a name (expression will be UDT) same as the parent folder that tag resides in.  
for eg.  
#tag path: Unit 1/Folder 1/Folder 2/Bit Status/Auto  
So with above expression, label for tags alarm will be “Folder 2”.

As i’m using UDT, I want a single expression that will apply to all its child tags alarm.

---

<div class="post-metadata">

**Author:** ![kunal.ghule](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@kunal.ghule](https://forum.inductiveautomation.com/u/kunal.ghule)\
**Post date:** [January 30, 2019, 6:54pm UTC](https://forum.inductiveautomation.com/t/alarming-expression/22231/2 "2019-01-30T18:54:18Z")

</div>

Nevermind, it worked when I used {itemPath} instead of {displayPath}.
