July 6, 200421 yr 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??
July 6, 200421 yr Assuming search is a global field, Set Error Capture [On] Enter Find Mode [ ] Set Field [stock#, search] Perform Find [ ]
July 6, 200421 yr Author 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?
July 7, 200421 yr 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
July 7, 200421 yr 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
July 7, 200421 yr 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.
July 7, 200421 yr Author 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.
July 7, 200421 yr Author oh and stock# is a 4 digit number. still cant figure out how to make it create a new field...
July 7, 200421 yr Author 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
July 7, 200421 yr 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.
Create an account or sign in to comment