Jump to content
Sign in to follow this  
fredley

Script to recognize NI Number.

Recommended Posts

I am using the following:

If((Right(NINumber;1) = "B" or Right(NINumber;1) = "A" or Right(NINumber;1) = "C" or Right(NINumber;1) = "D") and Length(i8) = 9;1;0)

to determine whether or not the entry in the i8 field is an NI Number. It outputs a 1 for JN473791D but a 0 for SG584332A. Why?

Share this post


Link to post
Share on other sites

I thought was something you beat with some shrubbery like in:

"Monty Python & the Quest for the Holy Grail"

But the expression could be written this way:

Position ( "abcde" ; Right ( NINumber ; 1 ) ; 1 ; 1 ) and Length(${8i})= 9

No need for iffing in vain, the ${ is due to the ignorance of the warnings made about propper naming of fields.

--sd

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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