My input data is simple: ID and input columns.
Input column contains strings separated with ‘/’. Number of separators varies between rows and input datasets. Strings ‘abc’ and ‘xyz’ should be treated as predefined list of important strings and the list should be easy to identify and update in the workflow.
Outcome should be the new column with one of four entries:
ABC for input containing one or more ‘abc’
XYZ for input containing one or more ‘xyz’
ABC, XYZ for input containing one or more ‘abc’ and one or more ‘xyz’
empty field for other cases.
This is sample dataset containing input and output data:
dhj / xyz / fri
akr / sdj
jft / kyo / xyz / ccc
lws / abc / djf / mew / yqa
ugh / xyz / abc
I’ve thought this should be quite easy to do, however I’m still searching for a solution. So far, I’ve tried loop, string manipulation (multiple column), cell splitter with no success.
Would you be able to support?
You are right, rule engine makes the job. The only disadventage is number of expressions. In case of 2 strings ‘abc’ and ‘xyz’ it is easy to manage limited number of expressions. However, the full list of strings searched might be dozens. Therefore, I would prefer to use ‘Table Creator’ to store the list of predefined important strings.
Your suggestions haven’t worked for me. Nevertheless, thank you both for your time.
Special ‘thank you’ goes to @denisfi for inspiring me to change my approach. Finally, I have found a solution to my problem and the solution refers to analyzing the entire content of the column/cell without caring about potential separator used there.