And what hardware will you be using?
Will you be using a USB barcode scanner? In "keyboard emulation mode" (the default setting for most of these units)?
Or will you be using the camera on an iOS device to scan the barcode?
Both are possible, but the implementation details differ.
Yes, I will be using a usb barcode scanner in "keyboard emulation mode"
Sure, I have read that already actually and am having some problems understanding it.
If there is an *before and after the barcode # (*123245*) is that equivalant to the special command you mentioned?
Currently when I scan labels, that label # scanned is being entered into what ever field my cursur is in the FM database.
That is not what that thread describes. You may need to consult with the technical support staff for your scanner if you cannot find out how to do this with your scanner in the accompanying documentation, but most scanners can be "programmed" to append text to the beginning and/or end of the scanned text. Some scanners come with software for configuring the scanner. One that I used could be "programmed" by scanning special barcodes in the user manual--the exact details and key combinations possible will differ with the scanner.
So once you have configured your scanner to do it, if you scan a barcode for 123, the scanner actually enters something like ~123¶ were ¶ is the return character.
Then OnLayoutKeystroke can check for the ~ and put the cursor into the correct field and if you then set up that field so that a return key exits the field, you can use the OnObjectExit trigger to detect the fact that the image has been fully scanned into the field and then performs the needed script to find the record with the code 123.
Please note that if you ever find that you can't use the scanner--it's down or the label is damaged and won't scan, you can manually enter the barcode into this same field and press return to get the same result. (Ever see a cashier do that at a cash register?)
I just received a bar code from the scanner company to program the scanner and the prefix and suffix are the same character "~". Is that a problem? Do the preamble and post-amble characters need to be different, (i.e. "~" and "¶")?
The example scripts in that thread require different preamble and postamble characters. The first one is detected in the script run by OnLayoutKeystroke and puts the cursor into the field so that the characters can be entered correctly. The Return at the end trips the OnObjectExit trigger set on this field to perform the script that then uses this data to do what you want done with it. Using this method, the Postamble can be a return, enter or tab character so long as you set up the field's behavior on the Inspector's data tab such that this character is one of the listed characters for moving the focus to the next field--which is what triggers the OnObjectExit script trigger.
This is not your only option for getting the second script to be perfomed.
I've also gotten this to work using InstallOnTimer Script.
How that works:
The first script detects the Preamble character(s) and puts the focus into the correct field using go to field or go to object. Then it performs an Install OnTimer Script with a very short interval. 1 second will probably work, but you'd have to test this and increase the interval slightly if needed to make sure that the interval is longer than the time needed to scan the barcode into the field.
Then your script to process the scanned data is the script step by this "timer" to be performed when the interval elapses. A final script step in your script uses Install OnTimer Script with no specified interval to cancel the timer. This is important or your script will process the data in the field over and over again on 1 second intervals.
If it isn't too much trouble could you write (copy ) the script here for the second option you mentioned, the on the timer options??? Also, would I be applying this script to the specific barcode field (text field that holds the barcode/barcode script) ??
They're nearly the same scripts:
If [Get ( TriggerKeyStroke ) = "~" and Get (TriggerModifierKeys) = 3 ]
Go to Field [YourTable::FieldForScannedData]
Install OnTimerScript ["ProcessScanScriptNameHere" ; interval: 1 ]
Exit Script [False]
Go To layout [specify the layout where you need this to happen if not the layout where you have your scanned field]
Enter Find mode  ---> clear the pause check box
Set Field [YourTable::DataField ; YourTable::ScannedData ] ---> ScannedData must have global storage speciifed or this script won't work
Set Error Capture [on]
Perform FInd 
If [ Not Get ( FoundCount ) // error: no records found]
Show Custom Dialog ["No record was found"]
#put the rest of your script here
I can't get it to work. Here are what my two scripts look like and I am setting the Script Trigger to the Bar Code Field(field that looks like a typical barcode) OnObjectKeyStroke and it is enabled in Browse and Find mode :
-IF[Get (TriggerKeystroke) = " * " and Get (TriggerModiferKeys) = 3]
-Go to Field [Sale Table::Bar Code]
-Install on Timer Script ["ProcessScanScriptName"; Interval: 1]
-Exit Script 
-Go to Layout ["RAM Sales Layout"]
-Enter Fine Mode 
-Set Field [Sale Table::Serial Number[Sale Table::Bar Code]]
-Set Error Capture [On]
-Perform Find 
-IF [no Get (FoundCount) // error: no records found]
-Show Custom Dialog ["no record found"]
Get ( TriggerKeystroke ) only returns a single character.
Get ( TriggerKeystroke ) = " * "
will never be true as the single character returned by the function will never equal the three characters ( a space, an asterisk and another space) shown in quotes.
Should I erase the: ( TriggerKeystroke ) = " * " ??
Can you tell from what I have posted, why it my not be working??
I just posted why it is not working
The three characters of " * " will never equal any possible value returned by Get ( TriggerKeystroke ) as this function only returns a single character.
It is not clear to me what Preamble you have configured your scanner to put in front of the text read by the scanning head. Thus, I cannot, from the information available to me, tell you exactly what change you need to make in order to get this to work.
One barcode format precedes and ends all barcodes with an asterisk, but this would not be a "pre-amble" set up by configuring the scanner, it's just the first letter of the barcode in those cases. (And I'd test this with a plain text field or on a word processor page to see if with that barcode format, the asterisk is actually input as the first character.)
It didn't copy the lines but this is what is underneath the BarCode field.
I believe the * are both pre/post amble for the scanner.
If I'm understanding you correctly, an * can NOT be set as the pre/post amble figures for the scanner? OR it could be but the only way to tell is do the following you stated...."(And I'd test this with a plain text field or on a word processor page to see if with that barcode format, the asterisk is actually input as the first character.)"