Each month I access data files for analysis, one file per day. Unfortunately because each individual file needs changes made as it's input, I have to go into the Data Input tool for each file and make 2 changes to the options: Output File Name as Field and Field Length.
Is there a macro floating around that I could use/modify to automate these changes? I would much prefer to drop the data file folder into Alteryx and let a macro or some other process do the work for me.
I'm not very familiar with macros and could use any help available! Thanks!
Changes needed to each file as it's input:
you can set this up as a macro - you'd need a control parameter/action tool hooking into each of those (as well as one for the data source) - and you'd need to format your data feeding into the control parameters to match the options you'd want. I'd recommend toggling the input data tool (with an action tool hooked up) to see the specific syntax required.
Hi @laneytrax
As opposed to adding the complexity of a macro, why not just use a Dynamic Input. Have the filename as a field in a Text Input tool and use this as the Field in the Read a List of Data Sources changing the entire path. This could also be start the start of a process whereby the workflow reads an input from a drive through a directory browser and picks the latest file, etc.
Also: If you just change the filename directly in the file path box of the Input data tool, without clicking on Set Up a Connection, the options of the Input Tool, Field Length, etc won't change
Dan
@danilang is correct - I read this as you wanted to dynamically set those two variables based upon some externality (ie some files would filename only/some would not) - and tailored my answer to that incorrect reading.
@danilang Thank you! It was an easy fix but will save me time and pain.