Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

List Box tool error in macro input

mithily
8 - Asteroid

Hi  I have a macro that works on the sort and sample tools.

First it lets a user pick a field or two to sort on and then samples the highest and lowest values and outputs them in two macro output

 

When I connect a file to the macro itworkflow.png

says it cant find the template fields in the macro. I am attaching the workflow

8 REPLIES 8
Raj
16 - Nebula

@mithily 
please add sample input data as it is missing here.

Raj
16 - Nebula

@mithily 
find the workflow attached

mark done if solved.

mithily
8 - Asteroid

Raj, thanks for your solution but the input files wont have fields named Field1 and Field2 those are only in the template file, I need the macro data to be replaced by the incoming file no matter what the fields are called in the input

mithily
8 - Asteroid

data here

apathetichell
19 - Altair

Are you editing the xml of your sort tool to adjust if you have one or two fields coming in and dynamically create it in xml? If the answer to that question is no - then your workflow is wrong.

You are hoping to dynamically change the number of tools flagged in the sort tool - this an xml change. you can change the field name pretty easily via action tool to sort tool - or dynamic rename - but the next part - the selection of one/two/three sort fields and how they are nested- that's the pain. you need to edit the xml of the sort tool (and know how to parse what's feeding from action tool to multi lines if needed). I'd recommend researching that here on this forum - because it's complicated and if done wrong it will break your workflow.

apathetichell
19 - Altair

And I'd also recommend having a strategy to convert your files from .xls to .xlsx - or read them in via python or something - .xls is a legacy format which will not be supported at some point soonish.

mithily
8 - Asteroid

Thanks apathetichell  the xls is just a sample file from the internet - I will change it to xlsx and also look into the xml - do you have any examples which modify the xml?

Labels
Top Solution Authors