Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

True or False then read different files

Hi, I am wondering if Alteryx can do something like, if a statement in Filter is true then read a file, if False then read another file.

Thanks!

5 REPLIES 5
gabrielvilella
14 - Magnetar

Yes, it is. You can have the file name on a table, use a filter and then read it via Dynamic Input.

Thanks! but how to use if then statement as a switch?

Felipe_Ribeir0
16 - Nebula

Hi @ccaohaventreebank 

 

One way of doing this using the batch input macro (for xlsx files, if your file is not xlsx you need to change the file type inside of the macro):

 

Felipe_Ribeir0_0-1674767673954.png

 

apathetichell
19 - Altair

I would recommend that you feed in the filename via a batch macro - this is pretty straight forward and worth your time to read up on... Without knowing what type of files you're choose between - take a look at this weekly challenge for ideas:

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-180-Thousand-File-Challenge/td-p/461356

 

The solutions to this challenge don't just change the name of the file being read in - they change the file type too!

thanks! This is very helpful!

Labels