Hi, I kept having the same result when I use the Yes No Dialog box to take the userinput.
My script is used by a WF. In the log I have an error thrown but I don't know why ! My message is shown to the user but either he clicks YES or NO , I have -1 as an answer so neither the yes or no function is called
Here is my code (x is always equals to -1):
def yes():
# handle YES button press
service.log("Button YES Pressed")
def no():
# handle NO button press
service.log("Button NO Pressed")
def dflt():
# display the initial message
service.yncerror("safety","PSAnnule")
cas = {service.YNC_NULL:dflt, service.YNC_YES:yes, service.YNC_NO:no}
if interactive:
x = service.yncuserinput()
service.log("User input: "+str(x))
cas[x]()
Can someone can tell my why ?
Thank you
------------------------------
Mathieu Guilmette
------------------------------
#AssetandFacilitiesManagement#Maximo#MaximoIntegrationandScripting