Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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/
-Rob
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..
Hi Venu,
Try like this
Data:
LOAD
*,
If(IsNum(PhoneNumber), 'Valid', 'Invalid') AS IsValidPhoneNumber
FROM DataSource;
Regards,
Jagan.
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..
Hi Venu,
Try like this:
If(len(PhoneNumber)='10', 'Valid', 'Invalid') AS IsValidPhoneNumber
Regards
KC
for better validation try this:
If(len(PhoneNumber)='10' and isnum(PhoneNumber), 'Valid', 'Invalid') AS IsValidPhoneNumber
Regards
KC
If that's coming from a system(well or even manually entered I would use:
If(len(trim(PhoneNumber))='10' , 'Valid', 'Invalid') AS IsValidPhoneNumber
Hi,
Then check this option
Data:
LOAD
*,
If(IsNum(PhoneNumber) AND len(PhoneNumber)='10', 'Valid', 'Invalid') AS IsValidPhoneNumber
FROM DataSource;
Hope this helps you.
Regards,
Jagan.