# Perspective - Flex container - Hierarchic meta.name

**URL:** <https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 15, 2022, 2:45pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208 "2022-03-15T14:45:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [March 15, 2022, 2:45pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/1 "2022-03-15T14:45:12Z")

</div>

I’m on 8.1.15

I want to build a binding on a label by using the third level parent meta name, is there a way to acheive this ?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/9/b9949c5b538101c861ef8c4f845058e194d7187f.png)

I want to get the “DCM\_shot\_id” meta.name from the “value”, I have tried {parent.parent.parent.meta.name} but it doesn’t work.

Anybody can help me with that ?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 15, 2022, 3:09pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/2 "2022-03-15T15:09:04Z")

</div>

What are you trying to achieve?

I am having a hard time imagining why you would want to change the name of a container at runtime.

I can see how this could lead to many issues, such as breaking bindings.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [March 15, 2022, 3:15pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/3 "2022-03-15T15:15:40Z")

</div>

I don’t want to change the name, I want to get the name to build a binding.

I want to dynamise some labels based on the top parent…

Ex.: label.text =\> DcmShotId \<= That result comes from a functions that use as inputs “DCM\_shot\_id”, so I want to get meta.name of my hierarchic parent {parent.parent.parent.meta.name}

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 15, 2022, 3:27pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/4 "2022-03-15T15:27:02Z")

</div>

In perspective, traversing up the hierarchy can be a bit different and I find the best way is to use the property explorer.

For a property or expression binding, I believe that you’re looking for something like: `...../DCM_shot_id.meta.name`

In script I think you would be looking for something like `self.parent.parent.parent.parent.getChild("DCM_shot_id").meta.name`

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [March 15, 2022, 3:33pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/5 "2022-03-15T15:33:28Z")

</div>

I know that, but I want to get it fully dynamically, I want to build a binding to not “hardcoded” the destination, I have no advantage to use it if I have to point the name that I want to get.

In scripting I can do something like this: self.parent.parent.parent.meta.name

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 15, 2022, 3:38pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/6 "2022-03-15T15:38:25Z")

</div>

~~I don’t think you can build a dynamic property name in an expression.~~

You could do it in a script transform if you have something else to bind to, or you could perhaps add an event script to the value

EDIT: Turns out there is an expression function.

[https://docs.inductiveautomation.com/display/DOC81/property](https://docs.inductiveautomation.com/display/DOC81/property)

```auto
property('this.someString' + {...../DCM_shot_id.meta.name})

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 15, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/7 "2022-03-15T15:40:29Z")

</div>

> [@lrose](#):
>
> I don’t think you can build a dynamic property name in an expression.

[https://docs.inductiveautomation.com/display/DOC81/property](https://docs.inductiveautomation.com/display/DOC81/property)  
You can in Perspective, actually 🙂

I would have expected `{parent.parent.parent.etc}` to work, honestly.

EDIT: It looks like an intentional restriction that I don't see a way around. I'm not sure what technical limitations are implied; someone else may have more luck playing around with things:  
[https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.15/com/inductiveautomation/perspective/common/api/PropertyRef.html](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.15/com/inductiveautomation/perspective/common/api/PropertyRef.html)

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [March 15, 2022, 3:51pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/8 "2022-03-15T15:51:22Z")

</div>

I’m unable to get it working correctly, can you provide me an example, i want to get the parent.parent.parent.meta.name

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [March 16, 2022, 8:16am UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/9 "2022-03-16T08:16:56Z")

</div>

> [@luc.martin](#):
>
> In scripting I can do something like this: self.parent.parent.parent.meta.name

i suppose you can call a script in the expression too  
[https://docs.inductiveautomation.com/display/DOC81/runScript](https://docs.inductiveautomation.com/display/DOC81/runScript)

it doesnt seem like you can chain "parent" n expressions for some reason

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [March 16, 2022, 12:24pm UTC](https://forum.inductiveautomation.com/t/perspective-flex-container-hierarchic-meta-name/57208/10 "2022-03-16T12:24:31Z")

</div>

I finally opt for this solution  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/6/4689dc58f6bff40fec511e11511c54d92e524f9b.jpeg)
