Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gulshanrohilla
Creator
Creator

Doubt in email Validation....

Can anyone help me in how to validate a email address....?. below is the screenshot of the question

2nd question.PNG

1 Solution

Accepted Solutions
RSvebeck
Specialist
Specialist

Great. If you agree on the answers, please close the question as "answered", so the community can focus on unanswered questions.


Thanks,


Robert

Svebeck Consulting AB

View solution in original post

9 Replies
RSvebeck
Specialist
Specialist

if (purgechar(purgechar(Upper(Email),'ABCDEFGHIJKLMNOPQRSTUVXY.-_@')=Upper(Email),'Valid','Not valid') as Email.status



Svebeck Consulting AB
RSvebeck
Specialist
Specialist

Ooops


Not Purgechar. I meant keepchar...




Svebeck Consulting AB
RSvebeck
Specialist
Specialist

Here is it... finally



if (keepchar(Upper(Email),'ABCDEFGHIJKLMNOPQRSTUVWXYZ.-_@')=Upper(Email),'Valid','Not valid') as Email.status


Svebeck Consulting AB
gulshanrohilla
Creator
Creator
Author

thanks Robert

Now its working fine... Can you explain me this ('ABCDEFGHIJKLMNOPQRSTUVWXYZ.-_@') section...

RSvebeck
Specialist
Specialist



That is a list of the characters you want to keep from the email adress when comparing to the original content.


Keepchar examples:


keepchar('bonjour','jour') = 'bon'


keepchar('Abcd123','123') = '123'


purgechar is the opposite, it define which characters should be removed :


purgechar('bonjour','jour') = 'jour'


purgechar('Abcd123','123') = 'Abcd'


Have a look in the help files. They have often good examples. As a  beginner though it is dificult to know "what" to search for. But if you search for "string functions" in the help, you will find a lot of useful functions.


Robert














Svebeck Consulting AB
gulshanrohilla
Creator
Creator
Author

Thank You Robert again, but i just want to know why you are using hyphen and underscore(-_) in the substring..

RSvebeck
Specialist
Specialist

Oh, ok. Yes I added those because they are valid email characters and might exist, so they are needed for the comparison, in a general pupose. Perhaps they are not valid in your organization, if this is the case, just remove them.



Svebeck Consulting AB
gulshanrohilla
Creator
Creator
Author

ok, Got it

Thanks Robert

RSvebeck
Specialist
Specialist

Great. If you agree on the answers, please close the question as "answered", so the community can focus on unanswered questions.


Thanks,


Robert

Svebeck Consulting AB