Script help

A little help please with some syntax.

I can change the color of a tank liquid with the following expression in a “Dynamic Property” I set up fine.
{Machine/IO/T1_Level}<{Machine/IO/T1_BathTrigger}
BuT I now want have the tank in a container and change the “TankNum” property that container to change the Tag for easy copying. But the syntax is driving me nutz.

I have something like this in the Property Expression.
(Tag(“Machine/IO/T”+{Root Container.Container 1.TankNum}+"_Level")) < (Tag(“Machine/IO/T”+{Root Container.Container 1.TankNum}+"_BathTrigger"))

Thanx

You have the right syntax for the tag function. However, when you want to use the < operator it expects that both arguments are numeric. The tag function returns an object so we need to cast it to an integer or float:toInt(Tag("Machine/IO/T"+{Root Container.Container 1.TankNum}+"_Level")) < toInt(Tag("Machine/IO/T"+{Root Container.Container 1.TankNum}+"_BathTrigger"))

Perfect!

Thanks Travis