Column Expression simple help needed

Greetings,

I have something wrong with my column expression. Please see attached workflow file (image below).

Probably something really stupid I don’t see.

Thank you for any assistance.
image

COL EXPRESS CHALLANGE.knwf (37.0 KB)

Can you maybe explain what you want to return for each scenario? From what I can see in the demo it is always “DONATED;VALUE: $xx”. Does it differ?

In general I can see some potential issues with your nested ifs:

  • red square: that one is right now doing nothing - the if is entirely completed and there is more code below it that will overwrite if Class = B.
  • green square: that right now seems to be the main logic that gets executed, however it only covers various Class “letters” for Level 1.
  • orange square: this part of code is never reached - it is nested inside Class = G so if Class is not G then it goes to the last else
  • yellow square: This one is also in a weird position

In general there are some combinations where you actively have defined to show " " - e.g. Class = D, E, G combined with Projlevel 1.

2 Likes

Hello and thank you!

Your question is spot on. I apologize for not being more clear.

I have uploaded here a UPDATED workflow (noticed I had a variable name wrong).

I have also uploaded an Excel file that shows the expected results.

I guess this is perhaps not a so easy formula but maybe - not sure. I get twisted up with all the nesting and syntax.

Thanks so much for any assistance.

TW

COL EXPRESS CHALLANGE UPDATED.knwf (37.1 KB)

EXPECTED RESULTS FINAL.xlsx (10.1 KB)

Thanks for the reply MartinDDDD to original message as your pointers helped me down my path. I have solved my question and solution is attached so I marked myself as “Solved” :slight_smile: . Maybe not so simple as I thought. Ended up with almost 70 lines of code in this column expression node. There must be an easier way but who knows.
COL EXPRESS CHALLANGE SOLUTION.knwf (34.9 KB)

1 Like

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