# Column Expression X Expression

**URL:** <https://forum.knime.com/t/column-expression-x-expression/85237>\
**Category:** KNIME Analytics Platform\
**Created:** [December 11, 2024, 10:45am UTC](https://forum.knime.com/t/column-expression-x-expression/85237 "2024-12-11T10:45:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipereis50](https://forum-cdn.knime.com/user_avatar/forum.knime.com/felipereis50/32/78928_2.png) [@Felipereis50](https://forum.knime.com/u/Felipereis50)\
**Post date:** [December 11, 2024, 10:45am UTC](https://forum.knime.com/t/column-expression-x-expression/85237/1 "2024-12-11T10:45:23Z")

</div>

Hello everyone,

With the update to version 5.4, the “column expression” node has become legacy.  
It’s not a problem.

I use the column expression a lot, and it might be the node I use the most for setting up rules.

For me, one of the great advantages of the column expression is the ease of creating multiple columns or replacing values in multiple columns.

However, in version 5.3, we have the new “expression” node.  
I thought about starting to learn how to use it, but to me, it seems like it doesn’t allow the creation of multiple columns in the same node.

My question is: is that correct?  
If I want 10 columns, will I have to use 10 expression nodes?

Best regards…

---

<div class="post-metadata">

**Author:** ![MartinDDDD](https://forum-cdn.knime.com/user_avatar/forum.knime.com/martindddd/32/69988_2.png) [@MartinDDDD](https://forum.knime.com/u/MartinDDDD)\
**Post date:** [December 11, 2024, 11:12am UTC](https://forum.knime.com/t/column-expression-x-expression/85237/2 "2024-12-11T11:12:07Z")

</div>

Hey there,

learning the new Expressions node is a good idea as it sort of is the successor of Column Expressions.

With 5.4 it also allows you to create multiple Expressions (i.e. multiple columns):

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/1/4/148ad45d862474675e36ac3d38d42d7ed2f16c35.png)

You just click on the Add new Expressions Button.

Also it now allows you to reference a previously created expression in one that follows… that used to be one of the reasons I needed multiple column expressions nodes in the past…

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [December 11, 2024, 1:21pm UTC](https://forum.knime.com/t/column-expression-x-expression/85237/3 "2024-12-11T13:21:29Z")

</div>

Hi @Felipereis50 , you may also be interested in this discussion on the “old” and the “new”…

> [@Easy modification of path format](https://forum.knime.com/t/easy-modification-of-path-format/84800/5):
>
> Hi @laval, The original “labs” versions of Column Expressions and Variable Expressions should continue to be available with 5.4, but they have always been part of the “KNIME Column Expressions” extension, rather than the core nodes (now renamed to “KNIME Column Expressions (legacy)”) so you need to install that extension for them to show up in the node palette. I personally feel that calling the new nodes “Expression” and “Variable Expression” (with the singular “expression” instead of plural …

---

<div class="post-metadata">

**Author:** ![Felipereis50](https://forum-cdn.knime.com/user_avatar/forum.knime.com/felipereis50/32/78928_2.png) [@Felipereis50](https://forum.knime.com/u/Felipereis50)\
**Post date:** [December 12, 2024, 1:35pm UTC](https://forum.knime.com/t/column-expression-x-expression/85237/4 "2024-12-12T13:35:03Z")

</div>

Thanks for all information guys

_I really wanted this functionality to create an expression linked to another column where the column expression did not exist._

_Therefore, I will start the habit of using the “Expression node,” which seems to be more powerful._

🤜 ✨ 🤛

😁

---

<div class="post-metadata">

**Author:** ![harrytuttles](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/h/9e8a1a/32.png) [@harrytuttles](https://forum.knime.com/u/harrytuttles)\
**Post date:** [December 12, 2024, 6:54pm UTC](https://forum.knime.com/t/column-expression-x-expression/85237/5 "2024-12-12T18:54:43Z")

</div>

Thank you for the information. Of course the environment evolves and old needs to be replaced with the new.

The only problem I face in upgrading is that I have literally hundreds of column expression nodes. Replacing them individually would be very labourious and may inevitably lead to bugs. Meanwhile my entire workspace is littered with “Column Expression (Legacy”) headings. And if you stop supporting it, I’m in trouble.

Any chance we could see a utility that helps automate the process? Or at least replaces a single legacy node with the new one?

Thank you, KNIME is awesome!

---

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [December 12, 2024, 10:48pm UTC](https://forum.knime.com/t/column-expression-x-expression/85237/6 "2024-12-12T22:48:01Z")

</div>

> [@harrytuttles](#):
>
> Meanwhile my entire workspace is littered with “Column Expression (Legacy”) headings. And if you stop supporting it, I’m in trouble.

I would say you are not alone @harrytuttles , and therefore there is safety in numbers! I would very much doubt that support for the Column Expressions node will cease any time soon. Move to newer nodes for new workflows where you can but don’t lose any sleep over the places you’ve used the older nodes.

There will be times when the new nodes don’t (yet) do what the old ones can do, so I would say continue using all of the features on offer whether they be “legacy” or not.

---

<div class="post-metadata">

**Author:** ![iCFO](https://forum-cdn.knime.com/user_avatar/forum.knime.com/icfo/32/36036_2.png) [@iCFO](https://forum.knime.com/u/iCFO)\
**Post date:** [December 13, 2024, 12:14am UTC](https://forum.knime.com/t/column-expression-x-expression/85237/7 "2024-12-13T00:14:55Z")

</div>

Ditto on my end. The one saving grace is that when I finally get around to replacing the hundreds of Column Expressions nodes, they will likely be replaced by dozens of Expressions nodes because they support multiple expressions in a series. I would like to see a mindset shift of tackling the difficult challenge of “updating” existing nodes (even when translating them is could cause errors because of major changes), instead of depreciating old nodes and creating new ones which creates user challenges. At least make it a built in option to try and migrate to the newer node replacements by utilizing KAI. Likely wouldn’t nail it every time, but should get us a decent starting point with way less work.

---

<div class="post-metadata">

**Author:** ![harrytuttles](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/h/9e8a1a/32.png) [@harrytuttles](https://forum.knime.com/u/harrytuttles)\
**Post date:** [December 15, 2024, 5:24pm UTC](https://forum.knime.com/t/column-expression-x-expression/85237/8 "2024-12-15T17:24:46Z")

</div>

Thank you both @takbb and @iCFO for your encouragement, most appreciated 👍

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [December 15, 2024, 10:22pm UTC](https://forum.knime.com/t/column-expression-x-expression/85237/9 "2024-12-15T22:22:01Z")

</div>

On another note: Does someone have an example of an if then else syntax with the new expression node. Maybe more than two options since of course you can use if() function for two options.

---

<div class="post-metadata">

**Author:** ![MartinDDDD](https://forum-cdn.knime.com/user_avatar/forum.knime.com/martindddd/32/69988_2.png) [@MartinDDDD](https://forum.knime.com/u/MartinDDDD)\
**Post date:** [December 16, 2024, 7:17am UTC](https://forum.knime.com/t/column-expression-x-expression/85237/10 "2024-12-16T07:17:01Z")

</div>

@mlauber71

Here you go…

I actually like the syntax and how you can make the logic more easy to understand by keeping different conditions on different lines…  
WF

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

Expression:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/8/6/86acaf5e416b738112982af59eb00ee97b1b37e2.png)

Prototype:  
[expressionsmultipleiftest.knwf](https://forum.knime.com/uploads/short-url/jdRiXrhq4V8my39FhhUXQq1IxPK.knwf) (74.3 KB)

---

<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:** [December 23, 2024, 7:17am UTC](https://forum.knime.com/t/column-expression-x-expression/85237/11 "2024-12-23T07:17:40Z")

</div>

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