# The following code checks the quality code on an component. If a quality is anything other than good, a message appears.
# Fetch the quality code from the Value property on a Numeric Label. The Numeric Label in this example is inside the same container as this script.
qualityCode = system.gui.getQuality(event.source.parent.getComponent('Numeric Label'), "value")
# Evaluate the quality code. If a value other than 192 is returned:
if str(qualityCode) == "Good":
# The quality code is good, so continue working. This example simply shows a message, but could be modified to do something more meaningful
system.gui.messageBox("The property is showing good quality")
# ...then show a message informing the user. Using Python's string formatting (%i) to pass the quality code into the message.
system.gui.messageBox("Operation Aborted \n The associated tag is showing quality code %s \n Please check the device connection" % qualityCode)