Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
JacobT
Partner - Contributor III
Partner - Contributor III

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

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

- Marcus

View solution in original post

6 Replies
marcus_sommer

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

- Marcus

JacobT
Partner - Contributor III
Partner - Contributor III
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 - Creator III
Partner - Creator III

Hi JacobT,

 

Try this:

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

 

JacobT
Partner - Contributor III
Partner - Contributor III
Author

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

marcus_sommer

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
MVP
MVP

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];