"Parse Error at char (n): Unknown variable..." Macro Error, No Error Workflow
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@DataNath apologies, I'm lost!
- I had a filter for a specific file before the macro.
- I think your suggestion was to place it inside the macro, correct?
- The filter is used to select the correct file for the input tool, how can I place the filter before the macro output? My thought is the macro would fail because it would be trying to pass 15 files (in each subfolder) vs. the one I'm trying to filter on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@DataNath I am trying to get the macro to:
- get a list of folders, currently 40 folders with 15 files
- loop through each folder and process 8 of the 15 files
- create a results file for each kpi
Knowing the exact files to process how would apprach it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There are specific file names as a unique way of setting them apart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.