In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Directory: Read From a Different Directory Based on Day

poles1c
8 - Asteroid

Hi,

 

Is there a way in Alteryx to dynamically change which directory you read a list of files from using the directory tool? For example, if it is Tuesday I want to read from Directory A, if it is Monday I want to read from Directory B. If the directory tool cannot not meet this need is there some other tool or tools I should be using to meet this goal?

 

Thanks!

 

Courtney

3 REPLIES 3
Joe_Mako
12 - Quasar

How about the attached Macro?

 

It uses the Action tool set to "Update Value with Formula", with the "Directory - Value" selected, the formula that you can edit by clicking on the "..." buttom at the bottom is:

 

Switch(DateTimeFormat(DateTimeToday(),"%A"),"C:\",
"Monday","C:\Monday",
"Tuesday","C:\Tuesday",
"Wednesday","C:\Wednesday",
"Thursday","C:\Thursday",
"Friday","C:\Friday",
"Saturday","C:\Saturday",
"Sunday","C:\Sunday")

 

action formula.png

poles1c
8 - Asteroid

Thank you!!!


@Joe_Mako wrote:

How about the attached Macro?

 

It uses the Action tool set to "Update Value with Formula", with the "Directory - Value" selected, the formula that you can edit by clicking on the "..." buttom at the bottom is:

 

Switch(DateTimeFormat(DateTimeToday(),"%A"),"C:\",
"Monday","C:\Monday",
"Tuesday","C:\Tuesday",
"Wednesday","C:\Wednesday",
"Thursday","C:\Thursday",
"Friday","C:\Friday",
"Saturday","C:\Saturday",
"Sunday","C:\Sunday")

 

action formula.png


 

KenMoorhead
7 - Meteor

@Joe_Mako wrote:

How about the attached Macro?

 

It uses the Action tool set to "Update Value with Formula", with the "Directory - Value" selected, the formula that you can edit by clicking on the "..." buttom at the bottom is:

 

Switch(DateTimeFormat(DateTimeToday(),"%A"),"C:\",
"Monday","C:\Monday",
"Tuesday","C:\Tuesday",
"Wednesday","C:\Wednesday",
"Thursday","C:\Thursday",
"Friday","C:\Friday",
"Saturday","C:\Saturday",
"Sunday","C:\Sunday")

 

action formula.png


It had never occurred to me use an action tool by itself for handling some internal logic, without another interface tool attached. I love this!

Labels
Top Solution Authors