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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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