Indirect Addressing through an Expression or an OPC tag

I want to address a tag within a tag using both an expression and by creating a new OPC Tag.
I have a tag with the following path:

 CMP2VC/EditRecipe/Step/Step_1_/TimeEnable 

I want to make the value of 1 in the above path dynamic. I have another tag that it should be referring to for obtaining that value. For example,

 CMP2VC/EditRecipe/Step/Step_[EditRecipeStepIndex]_/TimeEnable 

The EditRecipeStepIndex outputs an integer value and I want the tag to refer to that value.

I have tried it using two ways. One is through an expression and the other one through an OPC tag.
Neither worked!

Expression:

 tag({CMP2VC/EditRecipe/Step/Step_}+"toInt({CMP2VC/EditRecipe/EditRecipeStepIndex})"+"_TimeEnable") 

New OPC Tag:
In OPC Item Path

[CMP2VC]Global.EditRecipe.Step.Step[Global.EditRecipeStepIndex].TimeEnable 

Try:

Expression:

tag("CMP2VC/EditRecipe/Step/Step_"+toStr({CMP2VC/EditRecipe/EditRecipeStepIndex})+"_/TimeEnable")

[quote=“adamaustin”]Try:

Expression:

tag("CMP2VC/EditRecipe/Step/Step_"+toStr({CMP2VC/EditRecipe/EditRecipeStepIndex})+"_/TimeEnable") [/quote]

Works! Thanks!

I implemented it using Indirect Tag Binding but I wanted to find a way where I didn’t need to refer it to a custom property!

Is it possible to do this sort of thing by creating a new OPC tag and dynamically binding its tag path?

That’s what User Defined Types or User Defined Data Types (UDTs or UDDTs) are for.