Perspective - Flex container - Hierarchic

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 ?

I want to get the “DCM_shot_id” from the “value”, I have tried {} but it doesn’t work.

Anybody can help me with that ?

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.

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 of my hierarchic parent {}

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: ...../

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

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:

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.

property('this.someString' + {...../})
You can in Perspective, actually :slight_smile:

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:

1 Like

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

i suppose you can call a script in the expression too

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

I finally opt for this solution