Insert variable within variable(SOLVED)

What I want is to get a variable but at the end of that variable the number needs to be different so I want to reference it to another variable.

So i want to get this number:
Build.Drop.d1
But the one changes depending on various things. So it can be also:
Build.Drop.d2
Build.Drop.d3
and so on

So the 1 needs te be replaced with a different variable, Build.DropBarCheck variable
So
Build.Drop.d(Build.DropBarCheck)

But no matter what I do it doesnt work. So how do I do it

To reference a structure dynamically the whole child name needs to be a string and within the brackets. You don’t need a period before the bracket.

Build.Drop[ β€œd” + StringVariable ]

You would need a period after the bracket if there was another child.

Build.Drop[ β€œd” + StringVariable ].Version

But not if you accessed both dynamically.

Build.Drop[string] [string]

It can be confusing but it gets easier.

2 Likes

Thanks!!! I think it works now.

1 Like

Hello @NoLuck
I suggest you to insert (SOLVED) in the post title.

1 Like