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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Removing characters before first occurence of space using tMap

Hi Guys,
I just wanted to ask if is it possible to remove all the characters before the first occurrence of space in a string using tMap?
For example:
Input: "This is a sentence"
Ouput" "is a sentence"

Thanks! 0683p000009MACJ.png

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

johnpaul.dacop wrote:
Hi rana.abhimanyu90
Can you show me an example of how to do this? Thanks!

try using an expression similar to this :  row1.value.substring(row1.value.indexOf(" ")+1, row1.value.length()) 
0683p000009MGTj.png

View solution in original post

4 Replies
Anonymous
Not applicable
Author

johnpaul.dacop wrote:
Hi Guys,
I just wanted to ask if is it possible to remove all the characters before the first occurrence of space in a string using tMap?
For example:
Input: "This is a sentence"
Ouput" "is a sentence"

Thanks! 0683p000009MACJ.png

you can use the methods: IndexOf() and substring() for it.
Anonymous
Not applicable
Author

Hi rana.abhimanyu90
Can you show me an example of how to do this? Thanks!
Anonymous
Not applicable
Author

johnpaul.dacop wrote:
Hi rana.abhimanyu90
Can you show me an example of how to do this? Thanks!

try using an expression similar to this :  row1.value.substring(row1.value.indexOf(" ")+1, row1.value.length()) 
0683p000009MGTj.png
Anonymous
Not applicable
Author

Hi rana.abhimanyu90,
Thank you for this. This solves my problem.