Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic Field Type from Field Info

bmcclelland46
10 - Fireball

Hey All,

 

I know there has got to be a way to do this but I am stumped. For context, I created a macro that fills down/up multiple columns based on your selections but to do so I use a transpose and cross tab that makes every field selected a vString. I would like to maintain the original field types and put those back on their respective fields for the macro output. I dynamically know what each field type is from the field info tool earlier in the workflow but I need a way to force those field types onto the final output. I would prefer to have a method that does not nest a macro (tends to get messier at this point when it comes to distributing this macro for a large userbase). I know I should be able to do this but I need to be pointed in the right direction of what tool to use - I would think this would be easy.

 

Thanks!

3 REPLIES 3
bmcclelland46
10 - Fireball

I can even put the desired field type in the first row of data - just need that next step in converting the fields.

Maskell_Rascal
13 - Pulsar

Hey @bmcclelland46 

 

You can use the Multi-Field Formula Tool to dynamically convert fields. In order to utilize as you outlined below, you'd need to split your data apart to just the columns needing converted back to a double. I'm thinking something like the below:

 

Maskell_Rascal_0-1598986297627.png

 

I've attached the example workflow pictured above for you. You can expand on the filter options to capture different types of fields for converting. 

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

 

bmcclelland46
10 - Fireball

Makes sense - the solution is helpful. I would think that the developer palette could help us out a little more here but thank you!

Labels
Top Solution Authors