Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
su_pyae
Creator
Creator

ApplyMap not working after using TextBetween()

Hello everyone, 

I have Column A and Column B which is extracted from A using TextBetween. 

I used following IF loop to get Column B. 

If (Len(TextBetween(Column A, ';', ';')) > 0, TextBetween(Column A, ';', ';'), Column A) as Column B

Column C depends on Column B and I was trying to use ApplyMap() and using Column B is the key between two different tables. But it is working for some but not working for most of the values. 

As shown in the example, if it doesn't have to use TextBetween to get the value of Column B, it is working well. 

 

Column A Column B (using TextBetween) Column C (using ApplyMap) Correct Column C
horse; lizards; dinosaurs lizards Not working Animal
spending time; temporal rain; cheese temporal rain Not working Nature
Nice;dropped_elephant; ants houses dropped_elephant Not working Animal
rabbits_koala; brocoli; brocoli Not working Food
zoo; giraffe house; giraffe house Not working Animal
kitchen; pet_house; pet_house Not working Animal
Adele 30 Adele 30 Working Human

 

I hope my example is clear. Thank you for your help. 

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, that could be because the empty space after the semicolon, try adding a Trim():

Trim(TextBetween(Column A, ';', ';'))

Also note that the subfield function can be used to split a row in difffernt rows like:

Tim(Subfield(ColumnA, ';'))

View solution in original post

2 Replies
rubenmarin

Hi, that could be because the empty space after the semicolon, try adding a Trim():

Trim(TextBetween(Column A, ';', ';'))

Also note that the subfield function can be used to split a row in difffernt rows like:

Tim(Subfield(ColumnA, ';'))

su_pyae
Creator
Creator
Author

Thank you so much. Trim() works. 🙂