Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Find and Replace function + Generate rows function

NairutiPatel
6 - Meteoroid

Hi all, 

 

I am trying to use the 'Find and Replace' function to append a field to my existing records. Please see attached excel as reference. 

 

I want to append the 'terms' column to my original file using the 'category' column as reference. Than, I want to generate additional rows in my original file, depending on how many terms there are. So, for 'metastatic' two additional rows should be generated. I have created a map key file like the one attached. However, the field are not appending to my record - Alteryx has created another column on my original file titled 'Category2' with [Null] for all the records. Also, when i use the 'Generate Rows' functions with conditional expression as RowCount <= [Number of Terms], I'm getting a Parse Error at char(14): Unknown variable 'Number of Terms'. 

 

I'm not too sure what i'm doing wrong here. Many thanks in advance!

 

 

4 REPLIES 4
grossal
15 - Aurora
15 - Aurora

Hi @NairutiPatel,

 

I am not sure what exactly went wrong in your workflow and decided to create an example for you.

 

grossal_0-1591962607667.png

 

Result:

 

grossal_1-1591962624894.png

 

I'll attach the example. Let me know if this helped you!

 

Best

Alex

NairutiPatel
6 - Meteoroid

Thank you for the example workflow. If I now want for example, to separate out the terms for say metastatic so that the 1st duplicated row corresponds to Stage III and the 2nd duplicated row corresponds to Stage IV. How would I do that?

grossal
15 - Aurora
15 - Aurora

In this case, I wouldn't use the Generate Rows tool, but the Text-To-Columns.

 

grossal_0-1591963486697.png

 

Result:

grossal_1-1591963503756.png

 

We use the Text-To-Columns to split the Terms by Comma to Rows.

 

Settings:

grossal_2-1591963541719.png

 

Updated Workflow attached. I also added a Data Cleansing Tool to remove some blank characters.

 

 

Best

Alex

NairutiPatel
6 - Meteoroid

That was very helpful. Thanks a lot!

Labels