I have this weird issue where Im running a onAction script on a button. I pull 4 binary tags into the code via system.tag.readBlocking("blah blah tag") but when i try to use it in a if statement the code seemingly doesn't work not errors just a flag int i have embedded in code gets to the point where its used.
My work around is assign the tag to a custom prop in the button and then reference this in the code "self.custom.tag" and then the rest of the code executes as expected. Has anyone had this before?
Code Example
tag = system.tag.readBlocking('[PLC]Test/Tags/Tag')
value = self.getSibling("Table").props.selection.data[0].name
faultInt = 0
if value == "John Smith" and not tag:
faultInt = 10
else:
print("Continue")
No matter the conditions i return 10. If i change the "tag" reference to be the custom one as described it all works as intended.
edit* Formatted code for readability as suggested by nminchin.