Hey everyone...check this out:
Let's say I have a form with two fields on it: Last Name and First Name. Now let's suppose that if I'm in SEARCH mode and I type a last name in the Last Name field and press <ENTER> I want Remedy to go out and pull up all the tickets where the Last Name = whatever I typed in the field. However, if the form is open in MODIFY or NEW mode and I type in a last name and press <ENTER> I want it to do a lookup of my customers form and fill in the Last Name and First Name of the customer in the customer form that matches. In summary, if in SEARCH mode and I type a last name and press <ENTER> I want it to execute a search. If in MODIFY or NEW, I want it to do a lookup and SET FIELDS. OK, easy enough. I create an AL that fires only if $OPERATION$ = QUERY. That AL does a simple PERFORM-ACTION-APPLY, which effectively is supposed to simply click the SEARCH button. Then I create an AL that fires only if $OPERATION$ != QUERY. This is the AL that does the lookup against my customer form and sets fields. Easy, right? Well here's where it gets weird. The PERFORM-ACTION-APPLY seems to throw a monkey wrench into things. Remember, both ALs are triggered by pressing <ENTER> (Return) in the Last Name field. If I'm in SEARCH mode, and I type a last name and press <ENTER>, my first AL should fire but my second should not. But believe it or not, the second one fires! The way it behaves, it seems as if the Return event (pressing <ENTER>) carries over to *after* the form mode is changed from SEARCH to MODIFY. So pressing <ENTER> triggers the first AL, which does PERFORM-ACTION-APPLY, which executes a search and displays the results pane. Then the second AL fires because it "sees" the <ENTER> event even *after* the search is conducted and the form mode has changed! Weird. Any thoughts on this? Thanks, Norm _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

