# Accessing an embedded View in another Perspective view folder (Component Methods)

**URL:** <https://forum.inductiveautomation.com/t/accessing-an-embedded-view-in-another-perspective-view-folder-component-methods/82028>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 17, 2023, 7:34am UTC](https://forum.inductiveautomation.com/t/accessing-an-embedded-view-in-another-perspective-view-folder-component-methods/82028 "2023-11-17T07:34:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Roy](https://forum.inductiveautomation.com/u/Roy)\
**Post date:** [November 17, 2023, 7:34am UTC](https://forum.inductiveautomation.com/t/accessing-an-embedded-view-in-another-perspective-view-folder-component-methods/82028/1 "2023-11-17T07:34:02Z")

</div>

Hello everyone,

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/224732456051db877fcca64f5969ff96a7981b53.png)  
I have an event script triggered when 'button' is clicked. The script is suppose to assign a path to EmbeddedView which is in another folder. How can I go about this? The following doesn't seem to work:  
`self.parent.parent.getSibling("Users_Management").getChild("Flex_View1").getChild("EmbeddedView").props.path = "Admin Folder/Flex_View2"`

---

<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:** [November 17, 2023, 10:42am UTC](https://forum.inductiveautomation.com/t/accessing-an-embedded-view-in-another-perspective-view-folder-component-methods/82028/2 "2023-11-17T10:42:31Z")

</div>

> [@Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831):
>
> This thread is intended as a short help file for all those struggling to post formatted code on the forum. Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the \</\> button. It works the same as applying Bold or Italic styles to your document. It preserves indentation and applies syntax highlighting. [How to post code]

---

<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:** [November 17, 2023, 11:30am UTC](https://forum.inductiveautomation.com/t/accessing-an-embedded-view-in-another-perspective-view-folder-component-methods/82028/3 "2023-11-17T11:30:11Z")

</div>

> The script is suppose to assign a path to EmbeddedView which is in another folder.

If clicking the button also opens Flex\_View1 then use parameters:

1. Create a parameter on Flex\_View1, `embeddedViewPath`.
2. On the Embedded View component, create a Property Binding on `props.path` and set it to `view.params.embeddedViewPath`.

If not, (because the view is already open, for example) then consider using a session variable:

1. Create a session variable, `embeddedViewPath`.
2. Modify the script to update the session variable with the correct path.
3. On the Embedded View component, create a Property Binding on `props.path` and set it to `session.custom.sessionViewPath`.

* * *

If you are trying to build user management into your application then I highly recommend the Perspective User Management project available on Exchange below.

> **[Ignition Exchange](https://inductiveautomation.com/exchange/2128/overview)**
>
> Discover, share, and download community made Ignition resources in collaboration with your organization or the Ignition community.

---

<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:** [November 20, 2023, 4:28pm UTC](https://forum.inductiveautomation.com/t/accessing-an-embedded-view-in-another-perspective-view-folder-component-methods/82028/4 "2023-11-20T16:28:50Z")

</div>

> [@Roy](#):
>
> self.parent.parent.getSibling("Users\_Management").getChild("Flex\_View1").getChild("EmbeddedView").props.path = "Admin Folder/Flex\_View2"

"Siblings" in this context means "component" - NOT View.

Your provided View hierarchy doesn't suggest you have an Embedded View placed within Flex\_View1. So this is your first step.

1. Place an Embedded View into `Flex_View1`.
2. Modify your script to be this:

```python
self.getSibling("EmbeddedView").props.path = "Admin Folder/Flex_View2"

```
