Jump to content

[FP5] Validating Text


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

Recommended Posts

Group:

I am using FMP 5.0 Unlimited to hadle my database. I am scanning barcodes from client stations throughout the office. These barcodes Contain exactly 7 characters and all start with "F". I need to have FMP validate the data in the field to make sure it starts with the letter "F". Any thoughts on this? I have been looking at validation for text but have come up with nothing useful.

Thanks in advance.

Lakota

FileMaker Version: 5

Platform: Windows 2000

Link to comment
Share on other sites

I recently made a barcode inventory scanning database. I set up the scanner so it inputs into a global field, then pauses (for further data entry). When the user hit Enter, the script continued, dumping the global into the real field, and returning the user to the global for the next input.

I set this script up to catch scanning errors. After the global was filled with the scan info, I had something like (modified for you):

If (Length(g_Input) <> 7 or Left(g_Input) <> "F",

Show Message ("Scan was incorrect, try again")

SetField (g_Input, "")

Go To Field (g_Input)

Exit Script

Else

(do all the stuff required by a successful scan)

The awkward aspect is that this requires the user to hit the Enter button (NOT the return key) after every entry. I could not get the scanner to send a preamble (Ctrl-1) then a postamble (Ctrl-2), or I could have broken this into two scripts and avoided the pause and the enter button.

Steve Brown

Link to comment
Share on other sites

  • 1 month later...

Steve:

What model scanner are you using? Would a carriage return work here? I had to replace scanners for our inventory process and we have made the entire application "hasnd-off" for the users. They scan and run. All other data is related and populates either from system variables or from the database.

Just a thought.

Lakota

Link to comment
Share on other sites

Try this

Loop

[scan]

Exit Loop If (Length(g_Input) = 7 and Left(g_Input) = "F",

Show Message ("Scan was incorrect, try again")

SetField (g_Input, "")

Go To Field (g_Input)

Pause/Resume Script

end loop

else

etc.

Link to comment
Share on other sites

This topic is 6465 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
 Share

×
×
  • Create New...

Important Information

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