Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Enable/Disable Containter based on condition

anhdo92
8 - Asteroid

Hi 

 

I have a workflow that has 2 containers. Ideally these containers shouldn't run simultaneously and should output and send emails differently based on the availability of data. I'm looking to dynamically enable/disable the two containers based on the following conditions:


After the filter tool to check if data available:

 

if there is data available -> run Container 1 and disable container 2

if all cells are empty, no data available -> run Container 2 and disable container 1

 

Any idea is much appreciated!

4 REPLIES 4
cmcclellan
13 - Pulsar

You can't do that with containers, but if you have the correct filter setup it will work like you want anyway right ?

RolandSchubert
16 - Nebula
16 - Nebula

Hi @anhdo92 ,

 

you have to create a function using a condition tool to enable/disable Tool Containers based on a condition. I've written a blog regarding this (Output Data mit Bedingung: Nur schreiben, wenn ...... - Alteryx Community), unfortunately it's in German.

 

But - a a general approach for two containers, you can use this a s a "template".

 

Based on the condition, you set containers to enabled/disabled using a Condition tool.

 

2021-09-16_07-38-09.jpg

 

 I've attached a sample macro.

 

Let me know if this is what you need.

 

Best,

 

Roland

cmcclellan
13 - Pulsar

There you go, learn something new every day 🙂   Although I rarely use macros so I didn't know !!

 

@RolandSchubert  there is nothing attached to your post

RolandSchubert
16 - Nebula
16 - Nebula

Hi @cmcclellan ,

 

thanks for the hint, I added the macro.

 

Best,

 

Roland

Labels