Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Dynamic Replacement based on a different field

PKoya
8 - Asteroid

Hi,

 

I am working on a workflow which requires to overwrite the name of certain Units from their Old names to new names within the input data based on the Unit ID.

 

The New names of the Unit IDs will be provided as a separate input (mentioned as Replacements to be done below).

 

Note that the replacement needs to happen on the Unit ID.

 

I am just unable to figure out the replacement expression.

 

Input Data: 

PKoya_2-1619769480167.png

 

 

Replacements to be done:

PKoya_0-1619769322145.png

 

Target Outcome

PKoya_1-1619769451811.png

 

Any help would be really appreciated.

5 REPLIES 5
Emil_Kos
17 - Castor
17 - Castor

Hi @PKoya,

 

If I understand you correctly you need a find and replace tool:

 

Emil_Kos_0-1619769956336.png

 

PKoya
8 - Asteroid

Hi @Emil_Kos,

 

Thank you for your reply. The reason find and replace won't work is that I don't need a name replacement itself.

 

Only in case the Unit ID is are in replacement list do I need the name to be changed.

 

Find and replace would replace every instance of the name which is not required.

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @PKoya,

 

I am not sure if I understand correctly. Do you want to change the name only for the first ID that occurs in the data? 

 

If not could you kindly provide a little bit more details so I will be able to understand your requirement better? 

PKoya
8 - Asteroid

Sure, @Emil_Kos.

 

I have attached a sample workflow here which should give you more details.

Emil_Kos
17 - Castor
17 - Castor

Hi @PKoya,

 

I wasn't able to make it using the dynamic rename tool but the find and replace tool should give you the same output.

 

Apologies if I am missing something obvious but I am not sure what is the difference in your particular example. 

Labels