Hello,
I am confused what I'm doing wrong that would cause an error when converting a workflow to a batch macro.
I have a workflow that produces the expected results without errors:
I've converted the workflow to a batch macro. When I call the batch macro it can't find the field "member", however in the previous screen shot member is defined and there are no issues with the formula tool #33. What would be causing this error message?
Cheers
Solved! Go to Solution.
@joesparty I'd try putting these filters inside the macro so there's a check that, if the member field is there and there's the same amount of fields as expected then it Outputs from the macro, if not it just does nothing - then when all iterations are completed the Batch macro should just append all of the successful results together automatically by name if you've selected that option.
@DataNath agree with moving these filters inside the macro, but is that possible with; control parameter, action, input? I wasn't able to connect the filter tool.
No you won't be able to place a filter there. I was thinking you could place it just before the macro output so that if the file is there and passes through alright it'll output and be appended to the others, if not it'd be discarded (not output to anything).
@DataNath apologies, I'm lost!
What exactly is your macro doing @joesparty? With you initially saying you wanted to loop through filepaths, I thought you meant you wanted to do this and just have a consolidated dataset of all suitable files. This is why I suggested using a Filter just before the output to only output suitable files from the macro. However, if you know what files you want to process then the approach will be different.
@DataNath I am trying to get the macro to:
Knowing the exact files to process how would apprach it?
Do the target files have anything special like named differently or have a unique way of setting them apart? Failing that, I can think of a method using the Field Info tool to check if each file contains the [member] field and, if not, exclude them with a filter before feeding them to your control parameter. This would perhaps need to be a nested batch macro though.
There are specific file names as a unique way of setting them apart.
Ok @joesparty, in that case, after the initial Directory tool, you can just filter based on whatever that unique identifier is - that way everything that comes out of the true anchor should be these suitable files and feed into your batch macro fine.
@DataNath agree with the approach. The issue is I can only pass 1 filter to the macro. I have to pass 8 files, won't the macro still fail because the input tool is not looking for a specific file name? So Input File 1 would work when passing File 1, but fail on File 2.
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |