EddyB Posted May 7, 2003 Posted May 7, 2003 Hi, Has anyone ever set validation up on a field containing National Insurance Numbers (UK)? If so would you mind sharing how you did this please, whatever I try doesn't seem to work! It either does not validate correct numbers or validates incorrect numbers! Many Thanks Ed
cjaeger Posted May 8, 2003 Posted May 8, 2003 decribe the checksum algorythm then somebody might help ...
EddyB Posted May 8, 2003 Author Posted May 8, 2003 Hi, The National Insurance number is set out as follows: LL-NN-NN-NN-L L being a letter N being a number I tried setting the validation range: From: AA-00-00-00-A To: ZZ-99-99-99-Z But this only seems to check the first didgit So for example if the first didgit was the number 1 it would throw the error message up. But it would not throw an error message up if the last didgit was a number 1 Also, is it possible to set FileMaker to automatically enter dashes in the field, so for example you type the first 2 didgits and a dash appears, you can then continue to type the next 2 didgits and another dash appears? I know this is possible in Microsoft Access, is it possible in FileMaker does anyone know? Many Thanks - any help much appreciated! Ed.
cjaeger Posted May 8, 2003 Posted May 8, 2003 Try this file NSI numbers should be entered without dashes. You could allow both input methods by specifying a Substitute(NSI enter,"-","") in the appropriate places ... NSI.zip
EddyB Posted May 8, 2003 Author Posted May 8, 2003 Thanks Christian, This is just what I needed! I had to amend it slightly as: Left(NSI enter,2)>="AA" and Left(NSI enter,2)<="ZZ" Was allowing an entry starting with LN (Letter, number). I could enter the start of the number as A1 for example, this HAS to be 2 letters. For some reason when you specify >="AA" and <="ZZ" it allows a number as the second character. It is as though FileMaker sees a number (the 2nd character) as greater than A but less than Z which i found very strange. But hey it's working, thats all that matters to me! All I did was rather than the first argument looking at the first two characters, I split this into 2 arguments, the first checks the first charater, the second argument looks at the second character. This way it does not see the number as greater than A but less than Z. Thanks again Christian Ed
Recommended Posts
This topic is 7857 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