# Expression - Check if value is "IN" list of values

**URL:** <https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817>\
**Category:** KNIME Analytics Platform\
**Created:** [April 17, 2026, 10:32am UTC](https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817 "2026-04-17T10:32:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeorgeWright](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@GeorgeWright](https://forum.knime.com/u/GeorgeWright)\
**Post date:** [April 17, 2026, 10:32am UTC](https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817/1 "2026-04-17T10:32:53Z")

</div>

Hi,

I’m trying to do a check (and output an error column) if my value exists in a list of valid values as part of an Expression Node:

if(  
$[“ColumnValues”] = MISSING  
OR  
$[“ColumnValues”] IN (“YES”, “NO”, “TRUE”, “FALSE”, “X”, “0”, “1”),  
MISSING,  
$[“Field Name”] + " is not valid.")

I think I could use a rule based row splitter, then write my error message on the TRUE path before concatenating again, but that seems like an odd choice:

MISSING $ColumnValues$ =\> FALSE  
$ColumnValues$ IN (“YES”, “NO”, “TRUE”, “FALSE”, “X”, “0”, “1”) =\> FALSE  
TRUE =\> TRUE

I can’t see any standard way to do this? Am I missing something?

---

<div class="post-metadata">

**Author:** ![fe145f9fb2a1f6b](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@fe145f9fb2a1f6b](https://forum.knime.com/u/fe145f9fb2a1f6b)\
**Post date:** [April 17, 2026, 10:58am UTC](https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817/2 "2026-04-17T10:58:41Z")

</div>

tldr: Nope the Expression node does not support `IN` and it has no sensible way achieving your goal without cumbersome nesting or unnecessary long statements.

Alternatively, use the Rule Engine (supports `IN`), a Reference Row Filter/Splitter if your comparison is limited to 1 column or the old Column Expression Node

---

<div class="post-metadata">

**Author:** ![GeorgeWright](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@GeorgeWright](https://forum.knime.com/u/GeorgeWright)\
**Post date:** [April 17, 2026, 11:40am UTC](https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817/3 "2026-04-17T11:40:56Z")

</div>

Ok thanks. I’ve looked at the Rule Engine. But it also doesn’t seem to support combining strings, so I can’t achieve my desired output of:  
$[“Field Name”] + " is not valid."

I’ll have to stick with my rule based row splitter into Expression, which is a little bit annoying, but does work.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/b/7/b746919680ab28b883d2fbf80007f44644abc529.png)

---

<div class="post-metadata">

**Author:** ![fe145f9fb2a1f6b](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/f475e1/32.png) [@fe145f9fb2a1f6b](https://forum.knime.com/u/fe145f9fb2a1f6b)\
**Post date:** [April 17, 2026, 12:41pm UTC](https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817/4 "2026-04-17T12:41:21Z")

</div>

correct, the rule engine node can’t do things like dynamically combined strings (or math operations for that matter)

if you really want to do it in 1 single step, you can only go the way of Column Expression Node or Java Snippet (or any proper scripting node)

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 24, 2026, 12:42pm UTC](https://forum.knime.com/t/expression-check-if-value-is-in-list-of-values/91817/5 "2026-04-24T12:42:03Z")

</div>

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