Column Expressions or Rule Engine: If - then conditition

Hi all, I want to implement a solution which delivers an empty cell. If column a is filled with a number then deliver in column b an empty cell in that row. Is there a code for the named columns available? Thank you!

Hello @dibu,

if my guess is right and you have a string column where some cell values are only numbers then you can use MATCHES operator (regex based) from Rule Engine node to detect those cells and in another column create empty cells.

$colName$ MATCHES "\d+" => ""
TRUE => $colName$

Above expressions will create empty cell where there is one or more digits found or will take original value in case of non-number value. Why do you want empty cells?

In case you need some more complex if else constructions and want to use only one node Column Expressions is a way to go. You can check this workflow:

Br,
Ivan

Hi Ivan, the format in the cell is Number (Double) and contains in some cases a given value. In this cases I want to delete the calculated value in the neighbouring column

Hello @dibu,

I see. Seems even simpler then.

$yourColName$ = 99 => ""
TRUE => $neighbouringColumn$

where you’ll replace 99 with value of your interest and with option to replace neighbouringColumn. Keep in mind than in case neighbouringColumn is numeric it will be converted to String as numeric can’t have empty value. If you would like to keep it as numeric you would have to input missing value instead of empty cell. Then only one expressions is enough as Rule Engine will insert missing values where rule not matched.

NOT $column1$ = 99 => $column2$

If this is still not what you are looking for can you share some input data and desired output to avoid guessing?

Br,
Ivan

1 Like

Thank you Ivan, I Text this later on.

1 Like

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