Hi everyone,
I am working on a completing a workflow that will be used for many very different files.
In order to make this work I have to dynamically rename the first column the name "X". It has to be dynamic because the column name will always change. The other columns need to stay the same
How do I use the dynamic tool to achieve this?
I attached a simple file to be changed
Solved! Go to Solution.
So long as all of your other fields remain the same, you could use the Dynamic Rename tool. In the configuration, select Formula from the dropdown and deselect all fields except the one field that will change and "Dynamic or Unknown Fields" then simply enter "X" as the expression. This will change the name of any of the incoming selected fields to X and leave the others as-is since we did not select those.
@Kendra's way totally works - but if you have dynamic fields coming in - those too will be renamed "X". There are a few alternative ways but the easiest (to me) is to set up a text input with one row and one value, let's call it X and the value should be X. Then you use dynamic rename - but this time set to take the values from the right input rows by position. Set it to ignore when there's too few (or too many right input.). Only the first one will have it's values changed. See attached.
If you want to dynamically rename the first column with the name "X" and the column name may always change. You can approach like below
Workflow:
1. Use Field Info tool to get column names in order
2. Use Record ID to get row id
3. Use formula tool rename column name when Record ID is 1
4. Use dynamic rename to rename the columns
Hope this helps : )
Thanks! it works
Happy to help : ) @Guccio-Gasparrini
Cheers and have a nice day!
Brilliant!! 😮
This worked for me on a similar issue - thanks!