Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mcoetzee
Contributor
Contributor

Valid Email Addresses

Hi, 

I am trying to check for valid and invalid email addresses in my data, please see formula done below.

I am however still getting data data should not be in the valid field.

If(Len(IDNumber) <> 13 Or Right(IDNumber, 7) = '0000000' Or Right (IDNumber, '/') Or Right (IDNumber, 'NPO' Or Right(IDNumber, '()')), 'Invalid', 'Valid') as [IDnumber Valid],

Sample Data:

0000/00/00000

NPO/000/0000

0000/00/000(00)

 

1 Solution

Accepted Solutions
Anil_Babu_Samineni

If this resolved, Please close this thread.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

8 Replies
mcoetzee
Contributor
Contributor
Author

Sorry not email address, ID numbers.

Anil_Babu_Samineni

expected result?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
mcoetzee
Contributor
Contributor
Author

I would like to see what is a valid ID number  and what not.

arpitkharkia
Creator III
Creator III

I am not sure if you have used the right() function in the correct way. 

Can you post the logic you need and some sample data?

Anil_Babu_Samineni

Do you think this condition, Correct. For me it is quite wrong. As per your logic, Output will come like

Sample Data:

0000/00/00000 -------------> Len(IDNumber) <> 13 Or Right(IDNumber, 7) = '0000000' --------> True first part, Hence it will return 'Invalid'

NPO/000/0000 -----------> True --> Because, It is not the 13 Length --> Should return "Invalid"

0000/00/000(00) ---> true --> Because, It is not the 13 Length --> Should return "Invalid"

Below part is wrong for me. Can you explain what you are trying using these condition here?

Right (IDNumber, '/') Or Right (IDNumber, 'NPO' Or Right(IDNumber, '()'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
mcoetzee
Contributor
Contributor
Author

Sample Data

I would like to check in my data, which of the ID numbers are qualifying as a valid ID number, but i have special characters in of which when checking they are not a valid ID number.

ID NumberLenReason
810607500600013Valid
810607500611113Valid
811117500600013Valid
811(17500600013Invalid
811(175NPO10Invalid
8111175//00012Invalid
0///4Invalid
20016/0111/1113Invalid
Anil_Babu_Samineni

Try this?

If(Len([ID Number])=13 and not FindOneOf([ID Number], '!@#$%^&*()/\_+-={}[]:;"''<>,./?~`'), 'Valid', 'Not valid')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

If this resolved, Please close this thread.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful