# Breaking String (Window Path)

**URL:** <https://forum.inductiveautomation.com/t/breaking-string-window-path/78476>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [August 28, 2023, 7:47pm UTC](https://forum.inductiveautomation.com/t/breaking-string-window-path/78476 "2023-08-28T19:47:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ketan\_Suthar](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Ketan\_Suthar](https://forum.inductiveautomation.com/u/Ketan_Suthar)\
**Post date:** [August 28, 2023, 7:47pm UTC](https://forum.inductiveautomation.com/t/breaking-string-window-path/78476/1 "2023-08-28T19:47:37Z")

</div>

To all Awesome people,  
I want to display the name of the Window/ Screen in Header. I have used {[System]Client/User/CurrentWindow} in label expression however it displays full path.  
**" Folder Name/Folder Name/MM "**

How can I make to display just "MM" using expression or script.

Newbie to Ignition.

Thanks

---

<div class="post-metadata">

**Author:** ![CalebM](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@CalebM](https://forum.inductiveautomation.com/u/CalebM)\
**Post date:** [August 28, 2023, 8:01pm UTC](https://forum.inductiveautomation.com/t/breaking-string-window-path/78476/2 "2023-08-28T20:01:36Z")

</div>

You could easily do it in expression with [split()](https://docs.inductiveautomation.com/display/DOC81/split).  
Alternativily python also has a split function.

```auto
fullPath = " Folder Name/Folder Name/MM "
fullPath.split("/")

```

Both return lists and you will have to grab only the last item in those lists. Expression language should generally be used whenever you can.

---

<div class="post-metadata">

**Author:** ![Ketan\_Suthar](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Ketan\_Suthar](https://forum.inductiveautomation.com/u/Ketan_Suthar)\
**Post date:** [August 29, 2023, 12:33pm UTC](https://forum.inductiveautomation.com/t/breaking-string-window-path/78476/3 "2023-08-29T12:33:18Z")

</div>

Hi CalebM

Thank you for your response.

I use split function in expression for table and i got dataset however i am not sure how do i extract value from Row?

Thanks

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [August 29, 2023, 1:10pm UTC](https://forum.inductiveautomation.com/t/breaking-string-window-path/78476/4 "2023-08-29T13:10:05Z")

</div>

`try(split({[System]Client/User/CurrentWindow},'/')[len(split({[System]Client/User/CurrentWindow},'/'))-1,0],'')`

Note that in designer that tag is blank, that is why I wrapped it in a try.

---

<div class="post-metadata">

**Author:** ![Ketan\_Suthar](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Ketan\_Suthar](https://forum.inductiveautomation.com/u/Ketan_Suthar)\
**Post date:** [August 29, 2023, 1:53pm UTC](https://forum.inductiveautomation.com/t/breaking-string-window-path/78476/5 "2023-08-29T13:53:15Z")

</div>

Thank you very much MMaynard ✌

Appreciated:+1:
