Building FileMaker Serial Numbers

From Dwayne Wright PMP - Certified FileMaker Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

In this example, we have setup a serial number checker. I simply pulled a calculation out of thin air. This example is not a particularly great one but it does illustrate the technique. I don’t think I would use it in a production system but I might in a pinch.

First things first, I have four data entry fields that can hold up to 4 characters each. The characters can be / should be alphanumeric. I have five different variables I used to get numbers and the numbers need to add up to 10.

First off, I’m taking the first field and pulling the number values out of it by using the GetAsNumber(Serial Number 1) calculation. So e8au equals 8 and h7ga equals 7. So in this serial number system, the first field can really only hold one number.

Then I am looking at the first character in field 1, second character in field 2, third in field 3 and last in field four. Based upon what it is, I’m giving it a number result. So eight of the twelve overall characters in this string are being ignored by my checker.

I also built a script that will generate good serial numbers for me. The weakness in this design is that the right number in the first four characters will always give you a good serial number.

Again, this was for demonstration purposes only. You can easily noodle with the example for a few hours and come up with something very impressive. You could also do things to make sure a particular character is in upper case or lower case. Just about any wild thing you can imagine that works and you can create a script to create a high number of valid serial numbers on demand.

An example file can be downloaded by clicking (here)
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2010 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc