community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Read multiple file types with same macro using checkbox

Meteor

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.

 

Bolide

 

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.

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

Meteor

@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

Bolide

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.

Meteor

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

Labels