Free Trial

Alteryx Designer Desktop Discussions

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

Concatenate All Fields Dynamically

ricoo
8 - Asteroid

Hi All,

 

Is there a way in  Alteryx where in I could dynamically concatenate all columns from a data set? I’m thinking of using Multi-Field Formula, but I don’t know how I could apply it. I needed it to be dynamic so that it can accept different data structure from different data sets. If I could make it work, I'm thinking of using it inside a macro.

18 REPLIES 18
flying008
15 - Aurora

Hi, @lhanson2 

 

Please see the above pic for Dynamic-Replace tool set of post 5 by @ricoo .

ricoo
8 - Asteroid

Hi @lhanson2 apologies, I only got the time now to respond. the solution of @flying008 is working. The configuration for the dynamic replace is posted on my previous comment. But I'll also attach here.

 

DynamiceRename.png

KGT
12 - Quasar

Another way is a RecordID, followed by a transpose (RecordID as Key Field), then summarise to concatenate, grouping on RecordID. If you want to create JSON for instance, you would need a formula to combine [Name]:[Value] etc before concatenating.

 

The Dynamic Replace will be much more memory efficient and so quicker runtime, but the transpose/Summarise will be easier to understand/implement

ckelley0
8 - Asteroid

@flying008 I mirrored your work closely.  I made one small modification; I added a Multi-Field tool to change all fields to strings.  Thank you, that was very helpful. 

Spoiler
Alteryx Dynamic Concat.PNG

Carrot_WinWin
7 - Meteor

Hi @flying008 ,

 

this is so helpful. do you mind to share the setup for Summarize Tool? Struggling with this, really appreciate

KGT
12 - Quasar

@Carrot_WinWin, you can see the config on the video on the first response or in the last comment workflow package. Attached and below is what it looks like:

 

AlteryxGui_XMjS7avxoD.png

 

 
 

 

 

 

mvaldes
5 - Atom

Hi- Thanking everyone for this. This has been extremely helpful for me to concatenate columns dynamically. Having an issue with my concat_name field. It is truncating my data. I thought this would be an easy fix with a select tool before to force the name field to V_WString size 2147483647 and the Concat_Name Field in the Summarize tool still shows I have truncated fields. Any idea how to fix? 

mvaldes
5 - Atom

My data in excel for concatenating shows about 900 characters when I run a len on my concat

KGT
12 - Quasar

What is the data truncating to?

Is this a figure that resonates at all? 

Is the result exactly the same after changing the length?

 

In short, truncated data should be easily found and resolved. Just got to look at where and why.

 

Note: Hopefully this "truncated data" thought is not referencing the results window message.

Labels
Top Solution Authors