Alteryx Designer Desktop Discussions

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

Read multiple file types with same macro using checkbox

vepp
8 - Asteroid

All,

 

I would like to have single macro to read all xls and csv formats. Both file type needs different type of settings due to their difference hence I have  created 2 containers. My expectation here is 

to enable xls or csv based on a check box or radio button as per the need but the macro is throwing error if I don't provide input  to any one of them. The macro is expecting me to give values for both csv and xls even though the container is in disabled state.

 

In short, If I select CSV it should expect values only for csv and execute csv read. If  XLS is selected then it should run the XLS container without worrying about  input and output of CSV container. Attached the same workflow, please try and let me know your thoughts and idea.

 

NOTE : I have separate macros for CSV and XLS  reader which is working fine. This ask is to merge as a single macro.

 

6 REPLIES 6
cplewis90
13 - Pulsar
13 - Pulsar

 

Hey @vepp,

 

Instead of using the update value option in the action, use the "Enable/Disable Container from Question" option.

Actions.PNG

When using this option if you select CSV, you will want it to disable the XLS container (so the CSV check box action will need to be linked to the XLS container and the XLS check box action will need to be linked to the CSV container). 

redrawn actions.PNG

 

Let me know if this works for you.

BrandonB
Alteryx
Alteryx

You can connect an action tool directly to a container to enable/disable based on a True/False condition. I am thinking maybe you could use these to enable or disable based on what is being fed in?

 

Edit: @cplewis90 beat me to it 🙂

vepp
8 - Asteroid

@BrandonB @cplewis90   Thanks for the response. But I am getting below error. Looks like container is not disabled completely when I  have some  interface tools inside it. Is this expected?

 

Tool Container (2) Disabled containers may not contain interface tools.

 

clipboard_image_0.png

cplewis90
13 - Pulsar
13 - Pulsar

Hey @vepp,

 

Just put all interface tools outside the containers. You should be able to nest interface tools in the UI within others within the interface designer so when they are selected they will expand and show other options. Let me know if you have questions on this and I can send some screenshots.

vepp
8 - Asteroid

For others benefit. Attached macro will read from all type of Excels and CSV with multiple options

vepp
8 - Asteroid

Someone tested the attached reported that it has missing macro!. Please use this attached missing macro. This should resolve the issue. For some reason Alteryx didn't package it with all macros.

Labels