Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

National Insurance Number Validation

Featured Replies

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

decribe the checksum algorythm then somebody might help ...

  • Author

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.

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

  • Author

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.