Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

Check validity of a phone number

Hi

I have a members table with a column for cell phone numbers, and I need to output members with cell phone numbers that are invalid (less/more than 10 digits).

Can anyone suggest the best way of doing this?

I thought about using mapping as an indicator of which cell numbers are valid and which aren't but I am battling with creating an IF statement for how many digits the cell number is.

Would appreciate any help!

Thanks so much

1 Solution

Accepted Solutions

Re: Check validity of a phone number

For only checking the length of the number you could use:

if(len(PhoneNumber) <> 10, 'invalid', valid') as Check

But I doubt that this will be enough - normally you have to check for certain pattern from dialing code and phone number, various delimiter chars and so on. To check such things only with string-functions could be difficult. Therefore is it common to use regular expressions which unfortunately aren't be nativ implemented within qlikview - but there are workarounds: How to use regular expressions.

- Marcus

4 Replies
MVP
MVP

Re: Check validity of a phone number

Assuming a table with the member (name or id) as a dimension and this as an expression:

     If(Len([Cell number]) <> 10, [Cell number])

Will display only those with non-10 digit numbers

MVP
MVP

Re: Check validity of a phone number

t1.png

gautik92
Valued Contributor III

Re: Check validity of a phone number

Check this

Re: Check validity of a phone number

For only checking the length of the number you could use:

if(len(PhoneNumber) <> 10, 'invalid', valid') as Check

But I doubt that this will be enough - normally you have to check for certain pattern from dialing code and phone number, various delimiter chars and so on. To check such things only with string-functions could be difficult. Therefore is it common to use regular expressions which unfortunately aren't be nativ implemented within qlikview - but there are workarounds: How to use regular expressions.

- Marcus

Community Browser