leave triggers

Posted by ojfoggin on 05-Feb-2010 10:02

I have 2 fields on a window and together they form part of a query passed to the server.

They are NUMBER (fill-in) and TYPE (combo).

The TYPE combo defaults to "Order" but can be "Despatch", "Return", etc...

At the moment the only thing that happens when you change the TYPE combo is it sets the NUMBER fill-in back to 0.

There is a LEAVE trigger on the NUMBER fill-in that goes off to the server and checks if the input NUMBER is a valid order of the type selected in the TYPE combo.

If it is it will allow the user to open the enquiry screen of the order.  If not it throws back a message and re-enters the NUMBER fill-in for the user to enter another number.

My problem is this...

If I enter a number that is a despatch order number but I forget to change the comob then all I can do is delete the number, change the type and re-enter the number.

What I would like is to stop the LEAVE trigger from firing if I have pressed on the combo to try and change the type.

i.e.

Open the window.

Type in the despatch number and press tab to trigger "LEAVE".

Message "Does not exist".

Oops, press the combo (suppress the LEAVE trigger of the fill-in) to change to "Despatch". (At which point the system checks again)

Press OK.

Done.

I could change the system to only check when "OK" is pressed but I'm not sure how well this would work.

Hmm...

All Replies

Posted by Admin on 05-Feb-2010 10:11

Check the LAST-EVENT:WIDGET-ENTER reference.

Posted by ojfoggin on 05-Feb-2010 10:29

Perfect!

Thanks!

This thread is closed