Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!

Dynamic Rename tool multiple conditions Uppercase/Replace & rename based on field position




I need to apply multiple conditions to the rename tool

something like below


Replace(UpperCase([_CurrentField_])," ","_")


the first condition works fine i.e. change case to uppercase and replace spaces with an underscore


additionally i need to add a condition to same syntax to replace the 6th field name with specific word "TARGET"

as the 6th field name always keeps changing every month with the respective MONTH


Alteryx Certified Partner
Alteryx Certified Partner

Interesting challenge, it's possible but I would use a different technique to do it, which would be to create a lookup table using the field info and formula tools and then using the 'take headers from right input rows' option...


Example attached...




Hi @


your workflow does attend to the problem

i was trying to do this in the dynamic rename itself with a single formula as below without using the right input


IF ([_FieldNumber_] = 6) THEN Replace(UpperCase([_CurrentField_]),"*","TARGET")
Replace(UpperCase([_CurrentField_])," ","_")


the above formula does not recognise the Fieldnumber variable



your solution does work but had to make a small tweak in your formula to get the result

IF [RecordID] = 6 THEN

REPLACE([NewName],"*","TARGET") else [NewName] endif


had to change it to the below

IF [RecordID] = 6 THEN

"TARGET" else [NewName] endif


thanks for the solution


Thank you! I did not realize If/Then logic was allowed in the Dynamic Rename formula. I am going to have to start tinkering way more with all the different tools.