Generate new column from the value of another column of the same table

Good day,
I have a problem.

I have the following table:
in the column A i have
F-GE-001
F-GE-002
F-RE-001
F-PC-028
ETC

My goal is to append a column with as following:
F-GE-001 -> G01
F-GE-002 -> G02
F-RE-001 -> A01
F-PC-028 -> C28

It means, that every Province (GE,RE,PC…) has a codific characthers and the appendend column is of 3 char.

How shall I make it?

Thank you in advance

BR
Alessandro

Where is 1-character province code coming form?

One approach is

  1. use the Cell Splitter node to split the initial column via the ‘-’ delimiter
  2. use the Rule Engine or Rule Engine Dictionary node to assign your 1-letter code based on the newly created province abbreviation column
  3. Use the string manipulation node to join the result from step 2 with the leftmost 2 characters from the relevant numeric column from step 1
  4. Delete all the intermediate columns.
2 Likes

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