Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to perform exact match on concatenated string

Hello,

I have a scenario like the following

Table:

TESTING123

TESTING

Concatenated String:

TESTING123|TESTING

When I do a match in table for TESTING, I'm getting 2 items returned.  How can I make it so that my match ensures that the whole string matches and not something like a "contains"?  I can't really use match() because I'm actually looking in a concatenated string.  Also, I'll never know at what position my string exists.  Currently, I'm doing an Index(), but that's returning both strings, not just the 1 that I want.  Hope that makes sense.  Thanks!

15 Replies
Clever_Anjos
Employee
Employee

Michael Solomovich it´s a great honor receive a reply from you . You´re one of my "QHeroes"

Anonymous
Not applicable
Author

Not applicable
Author

OK this was definitely one of those "why didn't I think of that" scenarios!  I'm already doing the Index and the Concat so I'll just add my delimiter to the end of my search string.  And I'll say it again - why didn't I think of that?! 

Thanks as always!

Not applicable
Author

I've noticed one fallout on this... what if I've only made 1 selection?  So the concat I'm doing is on the list of selections made from a listbox.  If there's only 1 selection, there will be no delimiter added to the concat and therefore I cannot search on the string plus the delimiter.  Also, no matter the number of selections, the last one in the list is not being found because it also has no delimiter trailing.

Clever_Anjos
Employee
Employee

Please note that I didn´t use '|' as a separator to Concat, but concatenated to field, so the '|' is always there

Not applicable
Author

oohhhh!!  I see that now, thanks for pointing out the difference!