Expression tag on UDT binded to another UDT tag with parameters

Hi everyone,
I do not know if this question has already been asked but I can not find the solution.
I have created UDTs for tags with 2 parameters and everything works very well.
I need to create an expression tag inside a UDT but referring to the value of another tag of another UDT following the rules of the parameters.
I do not know if I have correctly explained myself …
Practically:
UDT1 = Measure (parameters: C1 and C2)
UDT2 = Device (parameters: C3 and C4)
Expression boolean tag within UDT2 = TagC3_C4_UDT1 > 350

If I try to point directly to the tag it seems to work but I can not make the expression work by trying to insert the UDT parameters…

Thank you!!

If your trying to use your parameters directly in an expression to build a tag, I don’t believe you can do that. But you can do a shared script and call it from your expression.

def ScriptCall(Var1,Var2):
	val = str(system.tag.read('tag/tagpath'+str(Var1)+'_'+str(Var2)+'_UDT1').value)
	return val

For the system.tag.read to work you need the full tag path. Then you’d call it from your expression using the runScript command.

runScript("shared.scriptname.ScriptCall",0,{C3},{C4})

If I read what you were asking for correctly then I think this would do what you need if you edit it to match what you actually have.

Have been trying to do a similar thing. I think you might need to use the tag(tagPath) expression function to read a dynamic tag value.

https://docs.inductiveautomation.com/display/DOC79/tag