Adam123 Posted July 6, 2004 Posted July 6, 2004 Lets say Im trying to perform a find with a script, and I dont want it to find a field containing a pattern lets say i have a record with a full vin number but I want to search by the last 6 numbers of the vin, it wont let me, but if I search for the first 6 it does, any way for it to match up anything containing lets say Jft434 in the vin field??
-Queue- Posted July 6, 2004 Posted July 6, 2004 Assuming search is a global field, Set Error Capture [On] Enter Find Mode [ ] Set Field [stock#, search] Perform Find [ ]
Adam123 Posted July 6, 2004 Author Posted July 6, 2004 howabout making it search any portion of the field and not just the begining? Also how do I make it create a new record if the search comes up with no matches?
Tina Marie Posted July 7, 2004 Posted July 7, 2004 aren't most vin numbers the same length? if they are then if you know how long the field is you can base a lot of search "buttons" based on that fact. e.g. search the first 6 chars, search the middle 6 chars, and so on. also, you can make your search create a new record if your found count equals to 0, by just saying that but I would suggest that you make sure that you performed a very good search before you do this, otherwise you will be making records were you don't need to. script is a get function (found count) Tina aka Blue
-Queue- Posted July 7, 2004 Posted July 7, 2004 Woah, you completely changed your original post, so my response looks useless. Nice. Okay, Instead of Set Field, go to a layout that contains the stock # field (assuming it's text and not a number; otherwise this won't work). Then Insert Calculated Result [stock #, "*" & search & "*" ] Perform Find [ ] If [not Status(CurrentFoundCount)] New Record/Request End If
Michael Myett Posted July 7, 2004 Posted July 7, 2004 All modern day vehicle ID numbers are 17 characters. The first digit is the country of manufacture. 2 - Manufacturer 3 - Vehicle make 4 & 5 - Car line and series 6 - body style 7 - restraint system 8 - engine type 9 - check digit 10 - model year 11 - manufacture plant 12 - 17 - production sequence number So searching on the first 6 digits is not a guarantee to find correct vehicle, for example, 1G1JC5 would find any american made 4-door Chevrolet Cavalier that happens to exist in your database. The vehicles become unique when you use the last 6 digits.
QuinTech Posted July 7, 2004 Posted July 7, 2004 Queue, i was about to suggest you take a little "rest" at a "nice quiet place" ...
Adam123 Posted July 7, 2004 Author Posted July 7, 2004 lol sorry for changing the post on you queue, I actualy figured it out by your post last week after some messing around right before you posted that agian. I know how vin #'s work, but in my industry I need to search for stuff and dont always have the whole vin number. Alot of the time I only have the last 6 which is very common. I dont need to search off the first 6. It already does that fine for some reason.
Adam123 Posted July 7, 2004 Author Posted July 7, 2004 oh and stock# is a 4 digit number. still cant figure out how to make it create a new field...
Adam123 Posted July 7, 2004 Author Posted July 7, 2004 woohoo! Figured out the create new thing using the get command, had to make an If script. now I just need to figure out how to make the vin search to search the last 6
-Queue- Posted July 7, 2004 Posted July 7, 2004 Insert Calculated Result [ vin, "@@@@@@@@@@@" & search ] should work, if each vin is 17 characters. @ stands for one character, so this forces the search to ignore the first 11 characters when searching for the given number. Jerry, thanks for the vacation offer. Do you think we could timeshare? It seems like you might have a spot reserved for yourself under the pseudonym of Snidely Whiplash.
Recommended Posts
This topic is 7705 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