AnsweredAssumed Answered

Repeated find/input for tracking data

Question asked by ChrisDeith on Jul 2, 2013
Latest reply on Jul 2, 2013 by schamblee


Repeated find/input for tracking data


     Hi all

     I have a button on my main layout to open a tracking data input screen, with which I can search for a particular invoice and then add the tracking data.  The idea is to be able to loop through this process as many times as needed before closing the window.  I have a barcode reader to assist input (it adds a <CR> to the data to automatically move to the next field) but the idea is that the data can just as easily be entered manually via the keyboard with the return key used to enter the data and moved to the next field.

     I use the "Enter Tracking Data" code (see below) to open the window (also attached) ready for input which also runs the "Input Tracking Data" code (also below) which runs the find process.  


     And first run through, no problem.

     But once the tracking data has been input, I want to start again & find another invoice.  So I added the same "input tracking data" script to the "on exit object" trigger of the tracking data field to restart the process when the first record has been updated. when they've finished entering data, the user can click "done" to close the window.

     While the script runs fine the first time through, when it runs the second time - via the on-exit-object trigger, it:

     - clears the current data (correct)
     - returns to the invoice field (correct)

     BUT this time, when I enter another invoice number, instead of carrying out a find/moving to the tracking field/waiting for data input, it just loops straight back to the invoice field?

     Something very basic and simple I'm sure but I just don't seem to be able to find the answer??!!  blush