Use OP digits inside the expression

Hi,
Is there any way to use op digits inside the expression?
I want to make the number inside the expression automatically corresponding to the OP digits that allow me to reduce the work of change the number when I copy and paste the OP.

if the OP name is: TrackIndex1
then the Expression of value0 is: parent().par.Track1

if the OP name is: TrackIndex2
then the Expression of value0 is: parent().par.Track2

if the OP name is: TrackIndex3
then the Expression of value0 is: parent().par.Track3

and so on…



me.digits

For your specific example:

getattr(parent().par, 'Track' + str(me.digits))

Or in the very latest TD versions

parent().par['Track' + str(me.digits)]

Hi Ivan,thank you so much for your reply.

Of course I knew “me.digits” but had no idea to use “getattr()”.
I see that’s how we use ParCollection Class and access parameter parametrically with simple expression.

Thank you so much.