I have a table like
Name | ID |
John | jn12 |
jim | jm13 |
jack | jk14 |
I want to add two new rows only if the ID column contains "jk14".
The two new rows would be something like
Name | ID |
jackson | |
jackie |
Final output if ID column contains "jk14" should be:
Name | ID |
John | jn12 |
jim | jm13 |
jack | jk14 |
jackson | |
jackie |
Final output if ID column Doesnt contain "jk14" should be:
Name | ID |
John | jn12 |
jim | jm13 |
Solved! Go to Solution.
Hi @Santhoshraj
If you're using 2023.1 then a workflow with a contains check and control containers should work nicely (I'm kind of just playing around with control containers where possible at the moment). The workflow is sort of a mess but looks like this:
It's using a summarize tool to concatenate IDs to check the presence of jk14 in any row in a filter. If there is an instance of jk14, the above control container is activated, adding the extra rows on. If there is no instance of jk14, the below control container is activated, but the two streams can be joined together. Without the control containers, the extra rows would still be unioned after the first control container so different logic would be needed.
@Christina_H Great. Thanks a lot. It worked for me.
@JamesCharnley Unfortunately I am using an older version of alteryx and couldnt try out your solution. Thanks for the help.