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,

3 REPLIES 3
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

Labels