We are in the final days to enter our Data and Analytics - "What's your why?" raffle with SparkED!

Reply with your "why" in text/video format to our forum post by January 28 to be entered! 

Dev Space

Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!

Enabling Disabling Containers based on a Condition

5 - Atom
Hi all,
I have a question regarding enable/disable container tool. I want to run a branch with Python code only on Mondays. So i've decided to put it all in a container and add a condition to enable it, but it doesn't seem to work. Maybe I missed something or there are other solutions?
Thanks in advance.
13 - Pulsar

hey @KirillZ 

Are you able to attach that part of your workflow to this thread please?

I'll have a look at your configuration.


7 - Meteor

I don't think the condition tool works like you are trying to use it. Its meant t be used with interactive input. So if you put this tool in and run the workflow as a workflow I don't think its executing and therefore your container will always be in its default state.

What I've done in this situation is 1 of three things.


  1. Put code in a macro that is called from another workflow. This way the interface tools can be used and can effect change
  2. Just put a simple filter before the Monday code. If Monday I return true, otherwise return false. That way zero records are flowing into that code block effectively preventing execution.
  3. Since you are already using python you can put a check at the top of the python script to check for the day of the week.

Hope this helps. otherwise as @KirillZ said if you can provide a snippet that at least demonstrates your logic that isn't working we can give more feedback.


Hi @KirillZ 


I would recommend checking out this solution: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Run-Container-workflow-by-condition/td...

This would be using #1 of @BobR 's solutions above.