Hi All,
I am taking an input from an excel file where the header/field names are as below
Function / Function ID / Region / Region ID
there are too many tables and too many columns to rename manually
i need a solution to convert all the header/field names to UPPERCASE and replace the spaces with an underscore as the header names in my oracle table appear that way
for eg. the above header names should convert to the below
FUNCTION / FUNCTION_ID / REGION / REGION_ID
is this possible in alteryx?
thanks,
Solved! Go to Solution.
You can use a DYNAMIC RENAME tool to do the job. Select ALL fields (that you want to operate on) and use Formula with:
Replace(UpperCase([_CurrentField_])," ", '_')
Your fieldnames will now be the FIELDNAMES that you want.
Cheers,
Mark
Hi @Shaiy10
Use Dynamic Rename tool with the following configuration
Replace(UpperCase([_CurrentField_])," ","_")
Dan
thanks for the quick solution, as was unable to figure out the syntax...
Hi @MarqueeCrew
additionally i need to add a condition to same syntax earlier to replace the 6th field name with specific word "TARGET"
as the 6th field name always keeps changing with the month name
something like below
Replace(UpperCase([_CurrentField_])," ","_")
or
replace(([_Field_No_6_]),"*","TARGET")
Hi @danilang
additionally i need to add a condition to same syntax earlier to replace the 6th field name with specific word "TARGET"
as the 6th field name always keeps changing with the month name
something like below
Replace(UpperCase([_CurrentField_])," ","_")
or
replace(([_Field_No_6_]),"*","TARGET")
thanks - working nicely
also one more solution discussed at the below link
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")
ELSE
Replace(UpperCase([_CurrentField_])," ","_")
ENDIF
the above formula does not recognise the Fieldnumber variable
This is a wonderful Solution even i have also tried. It work for me.