LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cancelling user prompt input still updates variable

I am using a "Prompt User for Input" Express VI to get a serial number from the user. I enabled the second "cancel" button as an escape option however if the user types in the serial number field before pressing cancel the value is updated regardless of which button has been pressed.

I realize that the second button is just labeled as "Cancel" by default and not necessarily designed to be a cancel button but is there a way to cancel the user input without having the field updated by accident without putting the whole thing into a loop with shift registers?
0 Kudos
Message 1 of 4
(2,783 Views)
You could try doing something like in the image below.  You can either pass the unchanged number into the case structure or make it an "NaN" to denote the prompt was canceled.




Message Edited by jmcbee on 07-17-2008 04:27 PM
0 Kudos
Message 2 of 4
(2,777 Views)
The Express VI still spits out a value since that's what the user entered. It's up to you to look at the "OK" output and update your front panel indicator only if this value is true.
0 Kudos
Message 3 of 4
(2,775 Views)
Thanks for the suggestions
0 Kudos
Message 4 of 4
(2,754 Views)