Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Remove blank spaces between a string

Hello Community

if i have too much space between 2 String  like that 'new             quest'

and i want to get this  result 'new quest'  with one space between new and quest.  

How can I do that ? 

i Did this : SubField('new quest',' ',1)& ' ' &SubField('new quest',' ',2) but it works only with one space between the two words 

 

Thank you Again 

4 Replies
Highlighted
Master II
Master II

Re: Remove blank spaces between a string

Something like this:

Left(index(String,' ')-1) & ' ' & mid(index(String,' ',-1)+1)

Highlighted
Partner
Partner

Re: Remove blank spaces between a string

This will work

= SubField('new     quest',' ',1)& ' ' &SubField('new     quest',' ',-1) 
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor III
Contributor III

Re: Remove blank spaces between a string

Hello @Vegar 
thank you for ur answer it works like magic but what if i had 3 words 
cause in the application which i'm working on .; i shoud delete all blank spaces between the words  and i  could have 3 or 4 word in one String 😕 

(Sorry abt my english) 

Thank you again 

Highlighted
Partner
Partner

Re: Remove blank spaces between a string

I have not verified it, but this might do the trick

Concat( trim(subfield( Field, ' ')), ' ')

BR
Vegar
Plees ekskuse my Swenglish and or Norweglish spelling misstakes