Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Convert Text value into Field Name

Mukeshy12390
8 - Asteroid

Hi All - 

 

I have situation where I have to merge two fields into one... let say First Name  and Last Name into new field "Full Name".

 

very simple process but thing is that  these two fields name could change in future, so is there way I can control these two field header through mapping or interface design.

 

what in my mind is if I could two text box and consider their value as field header.

 

please let me in case of more clarification.

 

Thank you.

 

7 REPLIES 7
andyuttley
11 - Bolide
11 - Bolide

Hi @Mukeshy12390 

 

I'd probably just use a dynamic rename tool, as attached and below

dynamicrename.PNG

 

 

Hope that helps

 

Andy

Mukeshy12390
8 - Asteroid

thanks for quick reply. I will check and confirm solution.

 

Do know if there is any formula which coverts string reference into field name.

like in Excel we have "Indirect function"

 

eg - "[" + [#1] + "]"

andyuttley
11 - Bolide
11 - Bolide

Yes, the Dynamic Rename tool allows you to rename column(s) based on an expression, as well as lots of other functionality. 

 

I'd recommend taking a look here, though if you need a specific example let me know 

https://help.alteryx.com/2018.2/DynamicRename.htm

 

Andy 

Mukeshy12390
8 - Asteroid

Hi Andyuttley,

 

one question , as I'm using two field for calculation (using Dynamic rename).

 

how can I get original fields (before rename) and along with new fields (after rename)?

 

Thanks.

 

 

 

andyuttley
11 - Bolide
11 - Bolide

Hi @Mukeshy12390 

 

Can you give an example of exactly what you're trying to do? 

Thanks

Mukeshy12390
8 - Asteroid

Okay. I will try.

Here is the situation.

I'm merging two text column .. let say "First Name" and "Last Name", As these two field header could change in future so controlling through mapping using "Dynamic Rename".

 

in mapping Column1_FirstName = First Name and Column2_LastName = Last Name.

once I renamed it I using "Dynamic Rename" tool I lose original name. 

 

How can i get and maintain both before rename columns and after rename column.

in other word I want all four columns. "Column1_FirstName = First Name and Column2_LastName = Last Name."

 

 

 

 

 

 

andyuttley
11 - Bolide
11 - Bolide

Interesting use case! Few ways you could do it. Simplest way would be just to join the data back to the input (by record position) once you've passed through the dynamic rename (as this will give you all four fields). 

 

Like this

Capture.PNG

Labels