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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFilterRow (Advanced mode/Java code) - Syntax issues !!

Hi everyone,
I have syntax issues in a tFilterRow (Java code in advanced mode).
I'd like to add these 2 conditions (with a "OR") :
1. Filtering only rows that end with "01" (type: String). What is the syntax for RegEx ? 
OR (||)
2. Filtering the first row (but once again I don't know the syntax for that. Is there a "first" function ?)
Thanks in advance for your reply 0683p000009MACn.png

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Add a sequence id for each row, to do it:
add a new column called id in the output table on tMap, and set its expression as 
Numeric.sequence("s1",1,1)

Then, you are able to filter the first row in the advanced model filed of  tFilterRow component, eg:
input_row.id==1||input_row.columnName.substring(input_row.columnName.length()-2).equals("01")