Updating tag with latest record from table?

Hi there,

i have a tag called operation_number and i also have the same value in a table. I want the tag to query the latest record from the operation_number value in the table for the respective machine. What is the best way to do this?
Is it using an expression or query? With the query method im not sure how i would get the machine name without hardcoding it. With the expression method if i could get the tagpath i could use a runscript but i dont know if we can get the tagpath

Whats the best way to do this?


I see you are not using UDTs. If you are connecting to multiple machines/devices/whatever of the same type, it is highly recommended that you create a UDT Definition with parameters that can represent that entity and includes all the necessary tags. That way you can simply create a UDT instance for each rather than creating all those tags manually.

Pertaining to the question in the topic: If you use UDTs, you can access the tagPath as a parameter in an expression tag to use with runScript().

1 Like