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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
APIZZI1686753315
Partner - Contributor
Partner - Contributor

Filter rows with a context value - value is an expression

Goal: build a data filter in context, and use the context value in a talend componant.

I use a context to create a filter expression. The value of context is correctly builded 

When I show the value  

System.out.println( " string : " + context.sSearchExpr ); 

Result : 

string : ( !( input_row.isIntern ) ) && ( !( input_row.isExternalEmail )

Now, how do use my context value in any talend componant( tFilterRow or tJavaRow)

Help me

Thanks.

 

 

Labels (2)
3 Replies
Shicong_Hong
Employee
Employee

Hello

It will not work. the filter expression will be treated as a string, however, the filter expression field requires a boolean value. 

Regards,
Shicong

billimmer
Creator III
Creator III

 is correct.  It will be treated as a string.  But, in java you can convert a string into a statement, execute it.  From the web:  

String javaCode = "if (polishScreenHeight >= 200 && polishScreenHeight <= 235 && polishScreenWidth >= 220) { }";
// Convert the Java String to a Java statement
Statement statement = new Statement(null, javaCode, null);
// Execute the statement
statement.execute();

 

manojkvrajan
Luminary
Luminary

Can you provide me more insight on the use case?