DaCo Posted February 21, 2012 Posted February 21, 2012 Task: Recieve input from user (using keyboard or barcode scanner) Lookup in Table_1 to see if the value exsists in the field "EAN" in any record If NO: show my error message (Other than numeric characters found or too few/many digits). If YES change the value of the field "Status" in the found record from "Inactive" to "Active" I need to validate the input to ensure that the format is excatly 13 digits (EAN-13 barcode). The barcodes in Table_1 is stored in text format. P.S. It would be nice to ask the user if the scanner returns only 12 digits: "Error! 1. Edit by keyborrd? 2. Add leading zero automaticly? 3. Cancel? P.P.S. Please excause my clumsy english; it's not my native language.
DaCo Posted February 23, 2012 Author Posted February 23, 2012 45 views in a couple of days, but no replies? I'm new here. Please advice me: is it a stupid question, is my english too clumsy ...? I can't believe that my problem is too difficult for the experts here :help:
imoree Posted February 23, 2012 Posted February 23, 2012 IN your fields table make sure you select validate and use 13 characters if { Length(GetAsNumber( YOURFIELD::Data)) ≠ 13 } then Show Custom DIalog ,etc End if you can also add leading zero by using the left & or Right built-in function
bruceR Posted February 23, 2012 Posted February 23, 2012 It is not clear what your question is. Though there may be a little problem with your English, you have described a process that is understandable and for all we know, something you may already doing. What exactly is your question?
DaCo Posted February 28, 2012 Author Posted February 28, 2012 Thanks, Jurneyman, that will be useful to me. About my question: Hmmm, let med simplify it and try again: I'm not already doing anything. My problem is: How to get starteded with this? I want to have an input field to recieve 13 digits (EAN-13 barcode) by barcode scanner (a simple "pistol" model) or by keyboard A function/script or what ever (I'm newbie) reads the value, performs a search in a barcode field in another table If the value is found I want the content of another field in the same record to change from "Inactive" to "Active".
comment Posted February 28, 2012 Posted February 28, 2012 See if this can serve as a starting point for you: EAN.zip
DaCo Posted February 29, 2012 Author Posted February 29, 2012 Wow, this is really amazing. Now I'm going to merge it with Journeyman's control function and implement it in a slightly different shape for my needs. For a newbie like me it was a bit of a challenge to analyze how it was made. I built a copy from scratch and it worked just fine at first, but when I got to the point where I had to figure out how the action itself (writing of "Current Timestamp") was released, I got at least 100 new gray hairs on my head. I could well imagine that it was a script, but under "Manage Scripts" there was only "New Script" which I assumed was an empty template and therefore took no notice of. When I eventually was ready for hospital wearing a cap with long sleeves occurred to me to open this script anyway and ... Viola!! Many thanks for help with the task, but also for new knowledge and inspiration for resolving future tasks.
Recommended Posts
This topic is 4920 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 accountSign in
Already have an account? Sign in here.
Sign In Now