Newbies deverett Posted February 1, 2007 Newbies Posted February 1, 2007 Is there a script that could check when entering a number if it has been used? For Instance we assign unique inventory numbers (1 letter then multiple numerals) such as B12345 to each entry. I was hoping there was a script that could alert us when we enter a number that has already been used. My guess is it would have to run after the number has been completely entered in the field so it wouldn't keep alerting us as we typed at B1, then at B12, B123 etc, etc. Any help would be appreciated and if anyone has a solution to my post the other day about the endless new record script problem that would be great Cheers Dino
mr_vodka Posted February 2, 2007 Posted February 2, 2007 You dont really need a script but you can use field validation instead. However, if these are unique records, why does the user have to manually enter a record number anyway? Why not use a RecordID field and then have another field that displays something like "B" &RecordID. This sample being overly simplified of course, and not saying you shoudl hardcode the "B" actually.
MelJ Posted February 4, 2007 Posted February 4, 2007 This can be easily accomplished by a "self join" in you relationships graph. Create a self join on the field that you want to check to see if it's been used. When you run your "Save" script have it check the second table occurence to see if it's empty. If it's not, you've got a duplicate entry.
Recommended Posts
This topic is 6504 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