Hi Community,
So basically I was trying to use a batch macro to extract the field name and the corresponding file name of all the yxdb file in a folder, using the list from directory input. (Workflow is as below)
When I run the macro itself, there is no error. However, when I run the macro within the workflow, it shows as below
Can anyone help with this? Thank you in advance!
Solved! Go to Solution.
Hi,
Without having a copy of the actual macro itself it is going to be tricky to troubleshoot an error that vague.
However, I do think there's an easier way to accomplish what you want, so I'm going to attach a batch macro that I think is somewhat simpler. It only has one control parameter and uses some of the functionality baseline in the Input Data tool to correctly identify the File name, and uses the Field Info tool instead of filtering and transposing data to get to the field names.
Thanks Claje! This is way simpler and faster! :)
Only one thing might be tricky - after selecting the file name, you might need to add unique to reduce the record number so that there won't be any error on the append tool if there is too many record in the original set.
If Alteryx have one hahaha... they should have one so that the whole community can help debugging
Hi,
This is a good catch on the unique tool! I think my initial proposal would probably have caused a Cartesian Product and ballooned your recordset. Glad it helped!