community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Dynamic Field Selection

Alteryx Certified Partner

Hi all, 

 

I just stumbled across a solution and thought I would share it. I was trying to select fields based on a a dynamic input, i.e.

required_fields
field1
field2
field3
field4

And my data:

field1; field2; field3; field4; field5; field6 .....
1      ; 2       ; 3       ; 4      ; 5      ; 6 .....

 

I've produced a macro that uses transposes and dynamic selects/renames to select only the fields that are present in the rows tool. Hopefully it will be helpful to someone in the future!

 

If anyone has a better way of doing this/has it been done before let me know, I'd be interested to see what else has been done. Or if this is even a problem?

 

https://gallery.alteryx.com/#!app/Dynamic-Select/56af2b23a248970f909a41d7

 

Thanks!

Ben - BIPB

 

Sr. Community Content Manager
Sr. Community Content Manager

Nice one. Here's an alternative approach...

Alteryx Certified Partner

Ahh, the Field Info tool! I always forget about that, thank you for your input. Your work flow definitely looks like the right way to do it.

 

-Ben

Hello,

without knowing "Dynamic Select" we have built in our team a macro we call "Standardize Structure", I just uploaded it ot the public gallery.

 

https://gallery.alteryx.com/#!app/Standardize-Structure/58f723def499c713d4206be4

 

It standardizes the structure of input stream based on provided template. We often use it in combination with our another dynamic macro called "Dynamic Sumarize"

 

https://gallery.alteryx.com/#!app/Dynamic-Sumarize/58f72349effc2a0dd0bec031

 

Hope it helps somebody,

Martin

Labels