Discussion board where members can get started with Qlik Sense.
i am looking for the code in phone number validation in a table..
I think the best way is to validate it in the script using a Regular Expression. See this for an example:
Qlikview Cookbook: Regular Expression Pattern Matching http://qlikviewcookbook.com/recipes/download-info/regular-expression-pattern-matching/
Could you post examples?
sorry robert..i have no examples..because present i am learning in qlikview.. please guide me how to write the code..i know isnum function is helpful to my code..but i don't know how to keep that function in my code..
Try like this
If(IsNum(PhoneNumber), 'Valid', 'Invalid') AS IsValidPhoneNumber
thankyou very much jagan its working..when i am enter the 11 digits numbers in the fields..the output will be comes in valid..but i want to display invalid..
Try like this:
If(len(PhoneNumber)='10', 'Valid', 'Invalid') AS IsValidPhoneNumber
for better validation try this:
If(len(PhoneNumber)='10' and isnum(PhoneNumber), 'Valid', 'Invalid') AS IsValidPhoneNumber
If that's coming from a system(well or even manually entered I would use:
If(len(trim(PhoneNumber))='10' , 'Valid', 'Invalid') AS IsValidPhoneNumber
Then check this option
If(IsNum(PhoneNumber) AND len(PhoneNumber)='10', 'Valid', 'Invalid') AS IsValidPhoneNumber
Hope this helps you.