Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to convert all non numeric values to blank in phone number field

I have an input phone number field that has some bad data in it. It includes some email addresses like Andrew@yahoo.com, special characters and an Extension value "x" for example "4034432253 x 311"

 

If I wanted to convert all non numeric data into blanks in this column how would I perform this along with removing the x in the extension

I know this string method replaces all characters that aren't numeric. Is there anyway that I can add on to this string method to convert any non numeric fields like email fields to blank if it contains @ sign.

row1.phone.replaceAll("[^0-9]", "")

 

Please advise

 

Andrew

Labels (2)
1 Reply
fdenis
Master
Master

you just have to use inline if then else
(condition)? then : else
regards