Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Newest File Input from Folder - Dynamic Input

jason_clough14
7 - Meteor

I'm having trouble pulling in the newest file from a shared network folder. I have gotten the directory and sort tool to work, but it seems like the sample is not pulling only the newest file... I also need help with the next steps for the dynamic input to pull that file from the sample function

10 REPLIES 10
Kenda
16 - Nebula
16 - Nebula

Hi @jason_clough14 

 

Is the problem here that you want to be sorting on the LastWriteTime field instead of the CreationTime field?

jason_clough14
7 - Meteor

The sort is working correctly, but then I wanted to sample only the top file because it will be the most recently created. Following the sampling, I would like to be able to create a workflow off that data.

jason_clough14
7 - Meteor

Hi,

 

Thanks that is helpful for the dynamic input tool... can you help with the sample portion? The workflow is basically using a directory to read a folder of 30 files throughout a month, then sorting those files by created date... I want the sample tool to select on the top (newest) file. Any ideas?

 

Kenda
16 - Nebula
16 - Nebula

@jason_clough14  When I download your workflow and run it, it seems to be working as expected (see below image). When using your sample tool and selecting "First N rows" and putting 1 in the text box for N, you are still getting more than one record? Are you possibly grouping by a column?

 

Capture.PNG

jason_clough14
7 - Meteor

I have not grouped by a column, should I be? This is my main issue I only want the one record

Kenda
16 - Nebula
16 - Nebula

@jason_clough14 No, I don't see a reason to group by any fields, I just wanted to ensure that wasn't causing our issue. How many records are coming through still after your sample tool?

jason_clough14
7 - Meteor

I believe I've found a solution using the Record ID tool, then filtering to record ID 1... this should achieve the same result?

Kenda
16 - Nebula
16 - Nebula

@jason_clough14 Yes, that is definitely one work around! I'm still puzzled as to why the sample tool wasn't working, though.

Labels
Top Solution Authors