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: 
YanivZi
Contributor III
Contributor III

Find char in array

I have field with array that looks like this:

2;3;4;5;6;7;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0

12;13;14;15;16;17;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0

22;33;44;55;66;77;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0

I want to find those where the number "2" exists (first row) but when i use the index function it gives all lines.

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

Sorry there was a typo by adding the extra ; which shouldn't be quoted with double-quotes else single-quotes, like:

wildmatch(';' & Field & ';', '*;2;*')

View solution in original post

3 Replies
marcus_sommer

You need to include the delimiter within your search, maybe with something like this:

wildmatch(";" & Field & ";", '*;2;*')

and the extra ; chars around the field consider also a match at start or ending of the string.

Beside this you may split the field with an internal subfield() loop into n records and fetching your wanted value afterwards with a flag or within a where-clause.

YanivZi
Contributor III
Contributor III
Author

Thank for your reply, i am using table chart and

wildmatch(";" & myField & ";", '*;2;*') did not work. its say error.

there is something else i can do?

marcus_sommer

Sorry there was a typo by adding the extra ; which shouldn't be quoted with double-quotes else single-quotes, like:

wildmatch(';' & Field & ';', '*;2;*')