I'm creating a gateway tag change script that needs to read other tag values in the same folder as the tag that the script is pointed to. I noticed that using a relative tag path doesn't work in the gateway tag change script, but it does in a tag value changed script.
Tag Value Changed Script:
relativePathTagID = system.tag.readBlocking("[.]Tag ID")[0].value
absolutePathTagID = system.tag.readBlocking("[default]Test Tags/Tag ID")[0].value
logger = system.util.getLogger("TagChangeScript")
logger.info("Relative Tag ID value: " + str(relativePathTagID))
logger.info("Absolute Tag ID value: "+ str(absolutePathTagID))
Gateway Tag Change Script (tag path pointed to same tag using the tag value changed script):
relativePathTagID = system.tag.readBlocking("[.]Tag ID")[0].value
absolutePathTagID = system.tag.readBlocking("[default]Test Tags/Tag ID")[0].value
logger = system.util.getLogger("GatewayTagChangeScript")
logger.info("Relative Tag ID value: " + str(relativePathTagID))
logger.info("Absolute Tag ID value: "+ str(absolutePathTagID))
Logs:
Do gateway tag change scripts use a different way to reference relative tag paths? Or am I forced to construct the absolute path to read other tag values?