Disable tool container based on a condition
- 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
I have a workflow which inputs, transforms, edits and writes the results to an output file that is in a tool container. As a part of the workflow, I am performing edits to ensure that certain characteristics are present, i.e. column headers are correct, no null values, valid values, etc. The error listing from the edit checks is captured in a separate output file. If the output from the edit checks contains a record count > 0, I would like to prevent the output within the tool container from writing the records to the output location. I added a test tool to each output from the edit checks and added the Runtime edit to 'Cancel Running Workflow on Error', but the output in the tool container still wrote the records to the output location. Can a condition be placed on the error listing output that disables the tool container if the number of error records exceeds 0? If so, how is that accomplished?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @mschmeiser
Try to addapt the attached workflow to your situation. You can check out this topic too: Dynamically enabling / disabling workflow sections - Alteryx Community
Outside of the macro it will be something like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Felipe_Ribeir0 Thank you for that feedback. Unfortunately, I am not familiar with macros and did not understand how to incorporate it into my workflow. I also tried to review with a co-worker, but was not successful. He provided an easier alternate solution [shown below] which works beautifully.
1. Count the records in the error file
2. Create a new field which is set to false when record count >0
3. Append the new field to the ouput that i want to control
4. Filter the output based on the new field to determine whether to write the output or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@mschmeiser I need help for disabling container based on condition.
I've three tool containers in workflow, these three container takes 3 different input files. But all the times these 3 input files are not there so, in this scenario i wanted to figure out how can container can be disables basis on condition if that file is not available.
