Icon

kn_​forum_​63233_​simple_​filter

simple inclusion and exclusion by rules in columns. Also apply a collection of rules to a group of columns

simple inclusion and exclusion by rules in columns. Also apply a collection of rules to a group of columns
https://forum.knime.com/t/help-with-rule-based-row-filter-according-to-excel-formula/63233/2?u=mlauber71

if( contains(column("col3"),"XYZ" ) ) {0 } else if ( substr(column("col3"),3 ,3) == "ABC" ) { 0 } else if ( contains(column("col3"),"TEST" ) ) {1 } else { 2 } simple inclusion and exclusion by rules in columns. Also apply a collection of rules to a group of columnshttps://forum.knime.com/t/help-with-rule-based-row-filter-according-to-excel-formula/63233/2?u=mlauber71 Rules to include a Row - you can later define that at least one Column must met the conditionor all negative definitions on multiple columns - later if there is one negative column the Row gets excluded combined definition of a single rule in two steps just createthe sample datatest col3with conditions"is_selected"sample.tablesample.table_cond_exclude1toBoolean(indexOf($$CURRENTCOLUMN$$,"XYZ")==-1)_cond_exclude2substr($$CURRENTCOLUMN$$,3 ,3 )_cond_exclude2toBoolean(regexMatcher($$CURRENTCOLUMN$$, "^(?!ABC$).*"))_cond_include1toBoolean(indexOf($$CURRENTCOLUMN$$,"TEST")>=0)mark_exclusions*_cond_exclude*Unique concatenatemark_exclusionsmark_inclusions*_cond_include*Unique concatenatemark_inclusions*true*is_selected Python Script Column Expressions Table Writer Table Reader String Manipulation(Multi Column) String Manipulation(Multi Column) String Manipulation(Multi Column) String Manipulation(Multi Column) Column Aggregator Row Filter Column Aggregator Row Filter Row Filter if( contains(column("col3"),"XYZ" ) ) {0 } else if ( substr(column("col3"),3 ,3) == "ABC" ) { 0 } else if ( contains(column("col3"),"TEST" ) ) {1 } else { 2 } simple inclusion and exclusion by rules in columns. Also apply a collection of rules to a group of columnshttps://forum.knime.com/t/help-with-rule-based-row-filter-according-to-excel-formula/63233/2?u=mlauber71 Rules to include a Row - you can later define that at least one Column must met the conditionor all negative definitions on multiple columns - later if there is one negative column the Row gets excluded combined definition of a single rule in two steps just createthe sample datatest col3with conditions"is_selected"sample.tablesample.table_cond_exclude1toBoolean(indexOf($$CURRENTCOLUMN$$,"XYZ")==-1)_cond_exclude2substr($$CURRENTCOLUMN$$,3 ,3 )_cond_exclude2toBoolean(regexMatcher($$CURRENTCOLUMN$$, "^(?!ABC$).*"))_cond_include1toBoolean(indexOf($$CURRENTCOLUMN$$,"TEST")>=0)mark_exclusions*_cond_exclude*Unique concatenatemark_exclusionsmark_inclusions*_cond_include*Unique concatenatemark_inclusions*true*is_selected Python Script Column Expressions Table Writer Table Reader String Manipulation(Multi Column) String Manipulation(Multi Column) String Manipulation(Multi Column) String Manipulation(Multi Column) Column Aggregator Row Filter Column Aggregator Row Filter Row Filter

Nodes

Extensions

Links