Alteryx Designer Desktop Discussions

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

Batch Macro to Dynamically Update Transpose Tool Using Action Tool

Harihk89
5 - Atom

Hello everyone,

 

I’m trying to build a batch macro in Alteryx to dynamically update the Transpose tool using the Action tool.

 

I was able to achieve this successfully when using a List Box (which requires user input), but I’m running into issues when attempting to pass the selected fields programmatically within the workflow (i.e., without user input).

 

Has anyone implemented something similar or have suggestions on how to dynamically update the Transpose tool via a batch macro using field selections from upstream tools?

 

Any guidance would be appreciated.

7 REPLIES 7
abacon
9 - Comet

Could you post the workflow you are working on? I have done something similar before but an example of what you are trying to do would be helpful in helping out.

apathetichell
19 - Altair

This is a bad idea. You can do what you are trying to do via editing the raw xml - but if you know how to do that - and can do that without errors - you should really use your listbox in list mode (" "," ") for your delimiters. you should then update a dynamic select tool with a statement like [Name] in ("mylst") or [Name]='RecordId" - where you replace the value of "mylist" (in my version quote inclusive) -> you have now dynamically filtered your fields. next use a transpose tool and transpose all (including dynamic. You have now dynamically transposed. Note -> you may want to use dynamic select tools - one with the inverse definition and include record id in both. you would want to use recordid as a key field in your dynamic select (see above). you can then join on recordid.

Harihk89
5 - Atom

Thanks for the response!

 

Here’s a bit more context on what I’m trying to achieve:

 

The fields from the Select tool will always serve as the Data Columns, and the Record ID field will always act as the Key Column for the Transpose tool.

The selected fields in the Select tool will change based on the incoming data. I’m building a macro so that the developer only needs to select the required columns in the Select tool, and the rest of the process — including dynamically updating the Transpose tool — is handled automatically by the macro.



Alteryx_Screenshot.jpg

apathetichell
19 - Altair

You do not use a select tool - you use a dynamic select tool. It is after your recordid. If you swap the tools and follow my instructions you can get this to work.

 

if you need to use a select tool -> hook that up to your list box as your input. your listbox goes to the action tool-> dynamic select.

Harihk89
5 - Atom

Thank you, I will try the approach you suggested.

apathetichell
19 - Altair

We good here?

apathetichell
19 - Altair

I'll ask again - we good here? If so - mark my solution as correct?

Labels
Top Solution Authors