Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7293 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have an inventory tracking solution that uses a bar code reader as its main data entry devise. I am looking for a solution that will allow the user to scan one bar code and automatically generate a new record. Specifically without the user having to use the enter key or a "new" button.

Any and all help and suggestions are appreciated.

Posted

I've done it by programing the barcode reader enter a "post-amble" (after the scan) character of the Enter key (not the Return key, which is often the default; a Mac Enter key may be different from a Windows one, to the reader).

Then I go into a Loop, with a Pause step, and read the barcode into a global field. The Enter key stops the pause, and the script continues, to do whatever you want.

Set Field [ Inventory::_gSKU ; "" ]

Set Field [ Inventory::__gStartedFlag ; 1 ]

Loop

Go to Field [ Inventory::_gSKU ]

Pause/Resume Script [ Indefinitely ]

Commit Records/Requests [ No dialog ]

Perform Script [ "In from _gSKU (form)" ]

End Loop

Set Field [ Inventory::__gStartedFlag ; "" ]

[The _gStartedFlag is optional. It controls a graphics field, red or green, stopped or started. You also want all buttons on the layout to respond correctly to a paused loop; some of them to Halt the script.]

Posted

I forgot to mention. You do have to hit a button to start the above script. So it's not really much better than hitting a button to create a new record, then scanning into the code field.

It may be possible to program a "preamble" code to run a visible script to create the new record, say "Cmd-1". That's 2 characters though, so it depends on the scanner, what they support. But then it's going to hit those keys whenever you scan something; which kind of limits what you can use that scanner for.

Also, it only does 1 item at a time, then it stops; and you have to hit the button again. It's really for doing 1 item at a time.

It is also possible to have a script that is a loop within a loop, which doesn't stop, but just keeps running until you stop it; so you can process multiple items. You still have to hit a button to start it, and you have to hit a button to end it.

It's like the above, except the loop doesn't stop. Setting the Start flag is outside the loops, run by a button; the stop button should Halt the script.

Posted

The Cmd-1 thing is really the way to go. Most scanners support this. If you're trying to find out how and tech support is no help, just tell them you want to use Windows Key-1

In FM 6 and earlier, make sure your first menu script is an empty script for files that don't need it, otherwise put in a script and have it check for the current field to decide what to do. In 7, you only need one scanning script, have it check the current field to decide what to do.

I recommend always scanning into global fields, then handle the rest with the script.

This topic is 7293 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.