Capitalise the header/field names to UPPERCASE and replace the spaces
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Developer
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Shaiy10
Use Dynamic Rename tool with the following configuration
Replace(UpperCase([_CurrentField_])," ","_")
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thanks for the quick solution, as was unable to figure out the syntax...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is a wonderful Solution even i have also tried. It work for me.
