2 Replies Latest reply on Dec 27, 2014 10:35 AM by philmodjunk

    Script Help



      Script Help


      Hi everyone,

      I was making an Inventory with a Barcode Scanner.

      I made a script that when entering to find mode, I scan the barcode of an item and it perform a find. It works great.

      But then I was thinking if to make it better, like:


      entering to find mode,

      scan the barcode of an item and it perform a find,

      and if it dones't find it,

      make a new record and enter it.


      Is there any way to make it that way?

      Thanks everyone.


      Wish you a happy holidays.


        • 1. Re: Script Help

          Before the 'Perform Find' script step, set Capture Error On.  Then use Get (FoundCount) to see if the Find returns any records.  Then use an If script step to either show the found records or create a new record.  I would suggest you offer the user a dialogue to confirm they really do want to create a new record (as opposed to re-define their Find criteria).

          • 2. Re: Script Help

            I agree with showing a custom dialog to confirm adding a new record. Scanners sometimes fail to completely scan a bar code and in such a case, you would not want a new record automatically created.