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
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
miro_kopecky
Contributor III
Contributor III

Recognizing phone numbers

Hi guys, I am pretty new with qlik sense and I have to write script for recognizing if the number from some text is a phone number from a certain country or not.
I think it could be based on prefixes. If anyone could help me i would be greatful.
Thanks in advance.

5 Replies
YoussefBelloum
Champion
Champion

Hi,

it depends on how and where exactly the phone numbers are written in a field, sometimes it is better to clean the source before trying to create a transformation script..

would you be able to share with us a portion from your phone_numbers field ?

miro_kopecky
Contributor III
Contributor III
Author

I have som text and in that text are some numbers and these numbers could be some phone numbers and i need to write a script that will recognize if this number is a phone number and ig it is from czech republic

czech phone numbers have prefix +420 and looks like this (+420) 123 456 789. The first three digits (123) in czech republic could be only 601 to 608, 702 to 705. for example 603 354 684

DavidŠtorek
Creator III
Creator III

Hi,

I am not sure if you are talking about phone number in general or for some specific company or group of people. But if in general you are not right about that restrictions regardings first three numbers.

Does this text come from some form, where people fill in phone numbers or just from some long text field? I am asking if there is some given format or not (like prefix will be allways in brackets etc.). Does text have given length, is it concatenated from more fields? Are there allways spaces between numbers?

kaanerisen
Creator III
Creator III

Hi Miroslav,

Check this thread. Thanks to swuehl , he published a really good and solid solution for this

Regular expression [A-Z] *

JustinDallas
Specialist II
Specialist II

I don't think RegEx exists in QlikSense, so you will have to do it outside of QlikSense (SQL query and such).

How to work Regular Expressions in Qlik Sense?