Alteryx Designer Desktop Discussions

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

Dynamically replacing content in a field with data from other fields

Adriankp
Asteroide

Hey all,

 

I'm working on a macro where I want a new field to be created which contains values from other fields concatenated, dynamically. A user should be able to choose fields from any dataset in a list box, and the macro should output the original data, with a new field with the concatenated vaues. What I'm struggling with is dynamically creating this new field dynamically.

 

The image below shows an example of a dataset, and the way I've currently been thinking about going about it. The field called *FillDownFields' in the image.contains the fields chosen in the list box concatenated. The next step would then be to replace "Field 1" in FillDownFields with the actual value of Field 1. So for example, on the first row I want the output to be: a§b§c§d§e

 

I've been playing around with the Dynamic Replace tool, but I'm struggling to really figure out how it works.

 

Does anyone know how I could accomplish this using the dynamic replace tool, or perhaps in a completely different way?

 

Adriankp_0-1657108118032.png

 

 Thanks!

2 RESPUESTAS 2
DataNath
Cástor

How does this look @Adriankp? It creates a temporary break-off stream, where the user-selected fields are isolated and concatenated, before being re-joined to the original dataset by a temporary Record ID:

 

DataNath_0-1657109427396.pngDataNath_1-1657109441984.png

DataNath_2-1657109458043.png

 

Have attached the app. For the example I just used | as the concatenation separator. If you're particular about this being § then all you need to do is change that in the Summarize configuration here:

 

Summarize separator.png

Adriankp
Asteroide

Ahh, that is a lot simpler than what I started trying. I probably should have thought about this myself. 😅

 

This should work perfectly. Thanks a lot for the quick help!

Etiquetas