Good afternoon all,
I am wanting to use the system.gui.confirm on a performed action. I cannot get it to work, says that I am missing attribute gui.
Please help.
def runAction(self, event):
"""
This event is fired when the 'action' of the component occurs.
Arguments:
self: A reference to the component that is invoking this function.
event: An empty event object.
"""
data = self.getSibling("DateTimePicker").props.formattedValue
category = "HMI"
source = "ASCADA Client"
usr = self.session.props.auth.user.id
message = str(usr) + " Changed END OF SHIFT to " + str(data)
data9 = usr
if system.gui.confirm("Are you sure you want to shutdown the plant?",
"Really Shutdown?"):
system.db.runNamedQuery("Tables/Change_Shift_Date",{
"data": data
})
#Update Syslog
system.db.runNamedQuery("Tables/syslog_update",{
"category": category,
"source": source,
"message": message,
"data9": data9
})
[details="Summary"]
This text will be hidden
[/details]