Alteryx Designer Desktop Discussions

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

Dynamic concatenation of fields

bharathjnair
6 - Meteoroid

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

4 REPLIES 4
JohnJPS
15 - Aurora

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!

jdunkerley79
ACE Emeritus
ACE Emeritus

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.

bharathjnair
6 - Meteoroid

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

 

farhana_91
7 - Meteor

PERFECT!

Labels