Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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??

Posted

Assuming search is a global field,

Set Error Capture [On]

Enter Find Mode [ ]

Set Field [stock#, search]

Perform Find [ ]

Posted

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?

Posted

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

Posted

Woah, you completely changed your original post, so my response looks useless. Nice. wink.gif

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

Posted

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.

Posted

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.

Posted

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

Posted

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. wink.gif

This topic is 7443 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
×
×
  • Create New...

Important Information

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