# Page path displayed in Perspective sessions

**URL:** <https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [October 11, 2023, 7:17am UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318 "2023-10-11T07:17:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DOH](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/doh/32/44079_2.png) [@DOH](https://forum.inductiveautomation.com/u/DOH)\
**Post date:** [October 11, 2023, 7:17am UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/1 "2023-10-11T07:17:47Z")

</div>

Hi

For the purposes of debug I want to add a text field at the bottom of each of my views and sub views to quickly allow engineers working on the projects to find the correct page location (Project is very large with multiple views)  
I have added the text field that is only visiable while in a "debug" mode.

Using the get page.prop.pageid function

 ![2023-10-11_07-58-08](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/8499806b5791231a6c5faf43c989bed6be21c53e.png)

the display result in the designer is correct but in the session is a string of apparently random characters

 ![2023-10-11_08-14-22](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/2/528b8f57497d0593821167dd928c6fefc1cab3e8.png)

Using the page.props.path function I receive only a "/"

 ![2023-10-11_08-16-30](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/e/de343611aaa9e82298679415b05be7b080de3409.png)

I presume I'm missing something basic here.

Any help welcome

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [October 11, 2023, 7:25am UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/2 "2023-10-11T07:25:15Z")

</div>

From the document:  
[https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective](https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective)

For page ID

> Note, that the value of of this property in the Designer will match the name of the active view. However, during a session the value will return a uniquely generated string, such as "2bf737f8".

You could instead use `path` which will show the page path if you need, though I would guess this is similiar to the URL?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 11, 2023, 9:00am UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/3 "2023-10-11T09:00:06Z")

</div>

> [@DOH](#):
>
> ... to find the correct page location ...

If you want to find the _ **view** _ location (or view name in the project) then add a label with the binding below.

 ![View id](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c85d19fe9ffcea895981989b4113a61a070b00f9.png)

`return self.view.id.split('@')[0]`

Rather than have a special debug mode I'd be inclined to place a discreet 🛈 icon or a very subtly shaded 10 × 10 label in the corner and configure the binding above on its tooltip text property.

```auto
meta.tooltip.enabled : true
meta.tooltip.text : <binding above>
meta.tooltip.delay : 5000

```

The information is unlikely to be of any use to anyone without access to the project.

---

<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:** [October 11, 2023, 7:18pm UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/4 "2023-10-11T19:18:18Z")

</div>

As you've likely gleaned from the previous responses, you're mixing behaviors of different scopes/clients as well as requesting information of two entirely different concepts.

The Designer does indeed provide the "path" of the View resource within the Designer, because the Designer has no concept of a "Page". This is why you can't see Docked Views or open Popups in the Designer. But we can't just pump `null` into the pageId, because even the Designer needs that value to be unique.

Now, what you're really asking for is the path to the View - not the path to the Page. Your running browser session is likely showing `/` because that's the Page you're on, and it's either using your View resource as the "Primary View" of the Page, or you've done View navigation to hot-swap the Primary View for your View resource.

---

<div class="post-metadata">

**Author:** ![DOH](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/doh/32/44079_2.png) [@DOH](https://forum.inductiveautomation.com/u/DOH)\
**Post date:** [October 11, 2023, 7:44pm UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/5 "2023-10-11T19:44:51Z")

</div>

Hi Transistor

The above method works perfectly to return the page path with folder ect in the session so the location can be found in the designer.

Thanks for the help.

For my sake

self.view.id.split('@')[0]

What is this doing ? Is there any documentation anywhere ?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 11, 2023, 8:04pm UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/6 "2023-10-11T20:04:39Z")

</div>

`self.view.id` is a component method. It's listed under object traversal.  
[https://docs.inductiveautomation.com/display/DOC81/Perspective+Component+Methods](https://docs.inductiveautomation.com/display/DOC81/Perspective+Component+Methods)

When I run `self.view.id` it returns the view name followed by some apparent junk. e.g., `viewname@D`. I have no idea why.

- `split()` is a Python method that breaks the string into a list using a separator character or pattern (or, if none is specified, it breaks on spaces).
- The result of the method in the example above would be `["viewname", "D"]`.
- `split('@')[0]` will return the first item in the list, `viewname`.

> **[Python String split() Method](https://www.w3schools.com/python/ref_string_split.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

---

<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:** [October 11, 2023, 10:20pm UTC](https://forum.inductiveautomation.com/t/page-path-displayed-in-perspective-sessions/80318/7 "2023-10-11T22:20:16Z")

</div>

> [@Transistor](#):
>
> When I run `self.view.id` it returns the view name followed by some apparent junk. e.g., `viewname@D`. I have no idea why.

It's been awhile since I had to venture into this area, but from what I remember, you're looking behind the curtain at the actual indexing of the View (and components do something similar). You can get a better idea of how this is all used by going to your Gateway, then `Status > Connections > Perspective Sessions`, select any (non-Designer) session, then dive into the Details of any Page in use by the session.

The letter following the `@` designates where the View resides.

For example: `Templates/Components/Input/Button@C$0:9:0`  
Is a View with a path of `Templates/Components/Input/Button`, in the " **C** entral" (Primary) View. It is the 0th child in some container which is the 9th child at the 0th level.

The "D" designation I believe refers to Designer. Docked Views clarify their side with "L", "T", "B", and "R", and I think Popup is "P".

You're actually also likely to see this indexing in use when a specific component has a script fail during execution.

```auto
15:17:47.466 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - Error running action 'component.onActionPerformed' on Experimentation/TabulaRasa@D/root/Button:

```

See the "D" designation for Designer?
