We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Expand/collapse collections based on the data

DesiPilla
6 - Meteoroid

Is there a way to dynamically expand/collapse a container based on specified criteria in an Interactive app? Two examples of what I mean:

  1. The output tool is placed inside a container. At the end of the workflow, if the data row count = 0 then collapse the container with the output tool and do not write any data. If the row count > 0, expand the container.
  2. An input file is loaded. If Column A is present in the file, expand a container that takes the data and manipulates/preprocesses/augments/etc the data. If Column A is not present in the file, collapse this container and expand a different container with some other process.

Essentially, I want to create some sort of logic that passes data to different flows based on information that is learned at runtime. I'm only aware of a way to expand/collapse containers based on user inputs in the app GUI, which will not work for this. 

 

Thanks,

6 REPLIES 6
mceleavey
17 - Castor
17 - Castor

Hi @DesiPilla ,

 

Yes, this is fine although I think you mean enable/disable the container rather than expand and collapse as that will have no functionality at all.

The best way to do this is to put the containers into a macro, add a control parameter and connect it to the disable/enable button. You can then feed the value that will determine this function into the macro as the batch parameter value.

For example, you can count the records and feed the record count into the macro as the control parameter value. In the macro, set the action to be update via a formula, and tell it be disable = "false" where the [#1] value is >0.

 

If you post your workflow I can build that for you if it's not clear.

 

M.



Bulien

DesiPilla
6 - Meteoroid

Thanks@mceleavey. I'm trying this implementation, however I'm unsure about one piece; you are suggesting that the output tool be within a container in a macro. However, if the macro is outputting the file, can I get it to appear as an output in the app (so a user can download the file)? I didn't specify in the post that this is for apps, but that is in fact my use case,

mceleavey
17 - Castor
17 - Castor

@DesiPilla ,

 

that's not a problem, you just to use the file browse to update a value which is then fed in to the macro as the full path of where you want the file to go. This means the user can determine the output destination.

I suppose this depends on use case, and it's difficult for me to say the best course of action without seeing the workflow and what you're trying to achieve.

 

I'm happy to jump on a Teams call if you want to. DM me if that will help.

 

M.



Bulien

Labhesh
8 - Asteroid

Hi  @mceleavey 

 

When uploading to Gallery, we’re trying to prevent a "Character Parse" error in Formula (3) when no records are available for parsing. Currently, the workflow correctly displays a "No Records" message, but the Formula tool still triggers a Character Parse error. Please note that we have intentionally left the text input blank to simulate our intended scenario where no rows are available.

One approach we're exploring is to dynamically disable or enable the Control Container based on the Record Count to prevent the formula from executing unnecessarily. However, we haven’t yet figured out how to implement this. Any suggestions or guidance would be appreciated.

 

 

 

 

 

caltang
17 - Castor
17 - Castor

Control Containers don't work that way. I would suggest for you to make a new post on the community as your topic and this old topic is not related.

 

I did a workflow that helps you achieve it:

 

image.png

 

Make a new post and I will upload the workflow there. Then you can mark it there to help others.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labhesh
8 - Asteroid

@caltang I have created new post.. 

 

Can you help us there ? Find the link below

Thanks for your support

Enable Disable Container based on record - Alteryx Community

Labels
Top Solution Authors