Learn more about the Alteryx Maveryx Universe recently announced at Inspire 2023!

Alteryx Designer Desktop Discussions

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

create duplicate field / column

nfoong
7 - Meteor

I have a column i want to duplicate (for the purposes of union and creating a new column with the common fields so that i maintain the integrity of the original data). 

I know that creating new columns is using formula.

 

can i have an example of the formula please?

4 REPLIES 4
NicoleJohnson
ACE Emeritus
ACE Emeritus
All you need to do in the formula tool is select "Add a new column", name it, and then in the formula area itself just type the name of the field you want to duplicate. So if you want to duplicate [Field1], you would Add a new column, name it something else (i.e. DuplicateField1, etc.), and then in the formula area, type [Field1]. You'll see the list of fields pop up as you start to type it. Hope that helps!

NJ
MarqueeCrew
20 - Arcturus
20 - Arcturus
New field:

[field to be copied]

That's it.
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
jonathandrummey
7 - Meteor

Just ran into this thread while searching and using a regular Formula tool has a potential issue in that if we want to preserve the original field/column's data type and size then we have to manually set that. This issue crops up when building apps and macros when users can dynamically select field(s) for processing and the subsequent tools need the original's data type & size. In that case I've found the Multi-Field Formula tool to be the easiest to use since that can create duplicate fields with all info.

 

Jonathan

 

n8mills
5 - Atom

I ran into this.  It seems that the tool should default to the source column datatype.

Labels