Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
JacobT
Partner
Partner

Remove space in emailadresses

I got a qvw that reads in data from excel and then adds it to nPrint.
No spaces are allowed in [e-post] as well it has to be lowercase.

I sorted out the lower as lower([e-post]) as [e-post],

Can I make one line to handle both the lower and the remove of spaces in e-post?

I read about 10 posts in the forum but could not find anything that worked, I tried a few different trims, replace etc.

The space can be anywhere in the e-mail, it's users who adds them.

1 Solution

Accepted Solutions
marcus_sommer
MVP & Luminary
MVP & Luminary

Maybe: lower(purgechar([e-post], ' ')) as [e-post]

- Marcus

View solution in original post

6 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

Maybe: lower(purgechar([e-post], ' ')) as [e-post]

- Marcus

View solution in original post

JacobT
Partner
Partner
Author

trim(PurgeChar([e-post],' ')) as [e-post], this solved first problem,
but can I incoporate lower on the same line?

I used to have lower([e-post]) as [e-post] for the lower before I added this.

Stoyan_Terziev
Partner
Partner

Hi JacobT,

 

Try this:

Lower(Replace([e-post], ' ', '')) as [e-post],

 

JacobT
Partner
Partner
Author

lower(PurgeChar([e-post],' ')) as [e-post], worked space between '' ofc, thank you for the help!

marcus_sommer
MVP & Luminary
MVP & Luminary

You could easily nest these functions - depending on the task (not in this case) it might be useful to apply functions like lower/upper at the most inside because it could reduce the efforts with the keepchar/purgechar and similar.

- Marcus

Vegar
Partner
Partner

Both these expressions should work:

PurgeChar( Lower([e-m ai l]), ' ')

and

Replace( Lower([e-m ai l]), ' ','')

 

Using this script:

LOAD * inline [
e-m ai l
jacob T@qlikcommunity.com
Vegar@ qlik community.com];

Plees ekskuse my Swenglish and or Norweglish spelling misstakes