Logic: DeviceSearchOK

If the user presses OK, we want to confirm some checks if a correct selection has been made and if so, assign the value to the table buffer entry "F-deviceNumber.Device". We set the Variable "accept" to "True" so we know on the lower level that the user pressed "OK".

IF G-deviceNumber.Search = "*" 
	ERROR "Please enter a valid Device number."

IF CLIP(G-deviceNumber.Search) = "" 
	ERROR "Please enter a valid Device Number."

LET F-deviceNumber.Device = G-deviceNumber.Search
LET V-accept = TRUE()
CONTROL cancel

The ProLinga "CONTROL" commands destroys the screen "DeviceSearch" and processing resumes in the logic calling this screen (dialog).