Looking for Starter Kits? Head to the Community Gallery! Now formatted as YXIs for easy installation.

Alteryx Designer Desktop Discussions

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

Dynamic rename in Table Tool for headers

6 - Meteoroid

Hello everyone!


I've been searching for a way to dynamically rename headers within the Table tool and coming up short. I found a couple of potential solutions, but I wonder if we have anything better at this point (one is from 2019). What I am trying to do is append a date based on a formula to multiple column headers.


I know we could use a Dynamic Rename tool to change the name of the header prior to entering the workflow, but since I'm using a date, the header name would be different every time it hits the Table tool which will put that field at the end of the output vs. the position I want it in. If it's just one field, there's a great suggestion in the article here where you put the "dynamic or unknown" field in the position you want it to appear. Very nice! 



We could also use two tables, ignore headers in one, merge, layout and go on our merry way. This looks like the solution I'd need to go with as I have multiple fields on the sheet that need to be updated. This discussion below is from 2019 and provides this solution. It's a great and creative idea and I really appreciate the solution provided, but I wonder if Alteryx might have added some additional flexibility to that tool that wasn't available in 2019? 



Has anyone uncovered a way to dynamically rename headers within the Table Tool?

17 - Castor
17 - Castor

@EVH Interesting! Maybe something like this would work. 



I'm using a find replace tool to find the old header names and appending the date to them.


Before Find Replace:



After Find Replace:








6 - Meteoroid

@patrick_digan this is an AWESOME approach and a brilliant use of the Find Replace and Field Info tools! I didn't think Find Replace could be used that way on a table. Thank you!


There's one thing I would add and that is in the formula for my specific case. If you use an "if/then" you can target the specific fields you want to hit with an update while leaving the other fields alone. I've got that attached in case someone is searching for a solution along those lines.


It seems like we should be able to do that right in the Table tool. Maybe that will be available in a future update...who knows? 😀 

17 - Castor
17 - Castor

@patrick_digan - every day is a school day!!!


I would never have thought that you can use Find Replace with something like a Reporting Table object.


This is awesome!!!

17 - Castor
17 - Castor

@DavidP You bet! You can actually use a formula tool as well, but the only annoying part there is you have to "convert" the field back to a reporting element. I've used that trick on a couple occasions. You can actually modify the pcxml/html which is cool.