Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Dynamic concatenation of fields

Alteryx Partner

Hi,

 

 

I have an app that lets a user select a list of columns from the data, which will be shown as output.

 

Suppose there is 10 columns and user selects 3 (A,B,C) from them. Is it possible to create a formula which will concatenate the 3 fields as ABC?

In case someone selects A,B,C and D, the concatenation field should have ABCD values. All fields are strings.

 

In short-How can i create a concatenation field that will dynamically concatenate the user selected fields?

 

Thanks,

Bharath

Highlighted
ACE Emeritus
ACE Emeritus

I've created a simple macro that will do this inline; hopefully it should be straigthforward for you to pursue the same concept in your Analytic App. Basically, I have a List Box of checkboxes attached to the Macro Input, which generates a custom list of ToString([f1])+ToString([f2]) for whatever fields are checked.  My action then replaces the expression in a Formula Tool with exactly that custom list.

Hope that helps!

Highlighted
16 - Nebula
16 - Nebula

Try the following:

 

  • Add a record ID
  • Use a Transpose tool to rotate from columns to row based
  • You can then use a summarize to concatenate
  • Finally join back on record ID to get the result

 

Simple sample attached.

Highlighted
Alteryx Partner

Thank you guys for taking a shot at the challenge. JojnJPS

 

Highlighted
Alteryx Certified Partner

PERFECT!

Labels