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
Solved! Go to Solution.
Is the problem here that you want to be sorting on the LastWriteTime field instead of the CreationTime field?
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 For help in configuring the Dynamic Input tool, check out these articles:
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t... (section 2)
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?
@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?
I have not grouped by a column, should I be? This is my main issue I only want the one record
@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 Yes, that is definitely one work around! I'm still puzzled as to why the sample tool wasn't working, though.