# Get View Path in Perspective

**URL:** <https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164>\
**Category:** Ignition\
**Created:** [May 29, 2020, 2:48pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164 "2020-05-29T14:48:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![reese.tyson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reese.tyson/32/41674_2.png) [@reese.tyson](https://forum.inductiveautomation.com/u/reese.tyson)\
**Post date:** [May 29, 2020, 2:48pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/1 "2020-05-29T14:48:29Z")

</div>

It looks like there are some functions for Vision to get the path to the window using system.gui.xxx, but the same function are not working in Perspective. Is there any way to get the path of a view that you are currently on in scripting?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 29, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/2 "2020-05-29T15:11:40Z")

</div>

I think you want `page.props.path`, available on the property tree.

---

<div class="post-metadata">

**Author:** ![reese.tyson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reese.tyson/32/41674_2.png) [@reese.tyson](https://forum.inductiveautomation.com/u/reese.tyson)\
**Post date:** [May 29, 2020, 3:21pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/3 "2020-05-29T15:21:41Z")

</div>

I see that ‘page.props.path’ for an embedded view to specify the view to be used but not on just a normal view. I also tried adding it to the page props section and it gave this error: “path: is not defined in the schema and additional properties are not allowed”. Am I missing something?

Page props:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9458ba5b56b4221fc89f1e4df1c9fed721bdeb0b.png)  
Root Container props:

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [May 29, 2020, 3:41pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/4 "2020-05-29T15:41:42Z")

</div>

There is no way to get the path of a View you are currently on via scripting with one exception. If the View is the primary View used for the Page you are viewing, binding against or using a script to refer to `page.props.path` will provide the path of the View but ONLY IN AN ACTIVE SESSION. The Designer does not have “Pages” available to it, and so the path does not resolve to the path of the View of the active Page.

 ![Screen Shot 2020-05-29 at 8.40.51 AM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e2dbfb8dcba04bc945b070778dc1349d73a61515.png)

---

<div class="post-metadata">

**Author:** ![reese.tyson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/reese.tyson/32/41674_2.png) [@reese.tyson](https://forum.inductiveautomation.com/u/reese.tyson)\
**Post date:** [May 29, 2020, 4:42pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/5 "2020-05-29T16:42:05Z")

</div>

I now see what @bkarabinchak.psi was saying. That is what I was looking for! Thanks guys!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 25, 2021, 2:54am UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/6 "2021-06-25T02:54:01Z")

</div>

I have a need to get the view path of a dock via scripting, I might create a feature request for this

---

<div class="post-metadata">

**Author:** ![Nikolai\_Wolterstorff](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolai\_Wolterstorff](https://forum.inductiveautomation.com/u/Nikolai_Wolterstorff)\
**Post date:** [October 28, 2022, 3:45pm UTC](https://forum.inductiveautomation.com/t/get-view-path-in-perspective/35164/7 "2022-10-28T15:45:02Z")

</div>

Posting this for future readers. Came across this and it might be a solution (still with some legwork):

> [@\[Feature-1739\]Perspective Relative Path for Embedded View, Flex Repeater, etc](https://forum.inductiveautomation.com/t/feature-1739-perspective-relative-path-for-embedded-view-flex-repeater-etc/42918/3):
>
> Perfect! I was attempting to implement a workaround like this and that self.view.id property is what I was looking for. That will get me going for now. Thanks!
