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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
JaneYu
Contributor III
Contributor III

how to check if a field is in a list of strings

there is a flat file with about 100 fields (fixed length)

I would like to filter the records with city in (city1,city2,city3,........city20) and output the file.

Is there any talend function or java function similar sql in () function?

city.equals(city1) || city.equals(city2)||..will work, but it is not convenient 

thank you.

Labels (3)
1 Solution

Accepted Solutions
vapukov
Master II
Master II

StringHandling.INDEX(context.cities,row1.city)!=-1

tMap filter (possible with little modifications for prevent partial matches), also will work

View solution in original post

2 Replies
Anonymous
Not applicable

Hi JaneYu

No similar function exists yet, however, you can create a routine function and call it in the job whenever you need to call it. Please refer to documentation Creating an user routine and call it in a job

 

Regards

Shong

vapukov
Master II
Master II

StringHandling.INDEX(context.cities,row1.city)!=-1

tMap filter (possible with little modifications for prevent partial matches), also will work