# Perspective get view's name from a button?

**URL:** <https://forum.inductiveautomation.com/t/perspective-get-views-name-from-a-button/93206>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 15, 2024, 6:04am UTC](https://forum.inductiveautomation.com/t/perspective-get-views-name-from-a-button/93206 "2024-07-15T06:04:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taohongyu88](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@taohongyu88](https://forum.inductiveautomation.com/u/taohongyu88)\
**Post date:** [July 15, 2024, 6:04am UTC](https://forum.inductiveautomation.com/t/perspective-get-views-name-from-a-button/93206/1 "2024-07-15T06:04:48Z")

</div>

In a button' script, how to get its view's name ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e8128a54df458986b15964b0b21e7e887627f835.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f9b429fb188c2d6023f4bf084664d2bc29ebd893.png)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [July 15, 2024, 6:11am UTC](https://forum.inductiveautomation.com/t/perspective-get-views-name-from-a-button/93206/2 "2024-07-15T06:11:37Z")

</div>

Are you trying to do this?

> [@\[IGN-6563\]How to get view name inside the view itself](https://forum.inductiveautomation.com/t/ign-6563-how-to-get-view-name-inside-the-view-itself/63819/6):
>
> self.view.id it puts some extra stuff after the name tho so you’ll want something like this i guess self.view.id.split('@')[0]
