Cast your vote for the official 2025 Inspire Pin! Designs were submitted by fellow Community members and reflect the creativity and passion of Alteryx users across the globe. Vote now!
Free Trial

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!

5 REPLIES 5
cmcclellan
14 - Magnetar

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
14 - Magnetar

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

latimo1
8 - Asteroid

I have a different use case. I use the Count Tool for 2 queries. If they match, I need to enable the Container and run the contents,. If they don't match, I need to do something different to one of the queries output.

 

I can't figure out how to connect the True choice to the macro. TIA! John!

2024-07-22_14-47-42.png

Labels
Top Solution Authors