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 it
says it cant find the template fields in the macro. I am attaching the workflow
@mithily
please add sample input data as it is missing here.
@mithily
find the workflow attached
mark done if solved.
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
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.
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.
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?