Rule based row filter

Hi,

I’m trying to filter specific rowID from my data using the rule-based row filter but every time I apply that rule, it gives me an empty table. Not sure what am I doing wrong. Any help would be great!

Here’s an image of my rules if that helps:

Thanks,
Hrshita

@hrshita welcome to the KNIME forum.

You will have to add a default rule

TRUE => TRUE

at the end.

Can you be more clear?

It worked! Thank you so much, but I’m not sure why the default statement should come at the end?

Hi @hrshita , this is not something that only Knime does. This is how it is in almost all programming logic.

This is because the statements are evaluated in the order they are. As soon as a rule is satisfied it won’t continue evaluating the other rules. So if you added the default rule of TRUE => TRUE, everything will be true.

1 Like

@hrshita the description of the node says this

If no rule matches, the outcome is treated as if it were FALSE .

The rule nodes are very powerful once you get used to the syntax :slight_smile:

2 Likes

Thank you! i’m new to programming and figuring the ropes of it.

Got it now, thank you!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.