Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

From a Sharepoint teamspace read always the latest excel File

Davide11
7 - Meteor

Hi, 

I have seen that threads like this were already answered a couple of times but the answers provided were unfortunately for me not clear enough.

I know ho to read a list from Sharepoint but in this case I'd like to connect to Sharepoint and from a teamspace read just the latest file added. (the identification of the latest file could be either through "date added" or part of file name (eg. List_2022_04)

Can anyone help with this?

Thanks

6 REPLIES 6
IraWatt
17 - Castor
17 - Castor

Hey @Davide11,

How are you reading in the SharePoint files, are you using the SharePoint file input tool? If you can guarantee the file format and when the new file will be made available you could use a macro to dynamically change the file path to the new location.

IraWatt_0-1652190455299.png

Do you have a link to the answers you thought were similar?

Thanks,

Ira

 

Davide11
7 - Meteor

Hi @IraWatt 

 

I actually haven't started yet implementing it because I am new to Alteryx and so far I just read files through the SharePoint file input tool.

Unfortunately I cannot guarantee that the format is kept and ther is no date when new files will be made available, it could happen any day any time.

 

Solved: Read in the most recent file from SharePoint - Alteryx Community

 

Thanks

gabrielvilella
14 - Magnetar

@Davide11 I have done this before. I recommend you using the new SharePoint connector to first get the list of file names for a folder, then read them using a batch macro with the SharePoint connector within it. You will need to update, using the Action tool, the file path, file name and sheet name (if the sheet name is not always the same).

IraWatt
17 - Castor
17 - Castor

Ah no worries @Davide11, from the looks of it the one way of doing this is to sync the folder up to your one drive Sync SharePoint files and folders (microsoft.com) then using a workflow like this:

IraWatt_0-1652192374214.png

Essentially the directory tool shows all files in a given folder and their information. We can then sort them by created time descending. Then select the top (most recent file) with the sample tool. Finally you then pass the file location to a dynamic input. This would ensure the most recent file is always inputted. 

 

IraWatt
17 - Castor
17 - Castor

@gabrielvilella didn't know you can do that with the tool!

IraWatt_0-1652193072048.png

that's a much better approach as it would save space on OneDrive I assume. 

gabrielvilella
14 - Magnetar

Yes! You don't need to sync any folder to the computer this way. And it works on other machines if you share it.

Labels
Top Solution Authors