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

Replicating Dynamic Input with SharePoint Files Input

MattBenj
9 - Comet

My company is transitioning from shared network folders to SharePoint and OneDrive so I'm working on updating workflows with the SharePoint Files Input tool (version 2.0.1 using Client ID/Secret/Tenant ID) . One scenario I've been having trouble replicating is the combination of a Directory tool and Dynamic Input tool like the workflow below.

 

MichMatt_0-1651678814826.png

The specific example I'm trying to solve is the need to get the names of all the files in a SharePoint folder, filter them based on name/meta data, then open the select files. I've figured out how to replicate the Directory Tool portion (using the "Import only list of file path" option) but I haven't found a way to replicate the Dynamic Input tool. Has anyone figured out how to do a Dynamic Input style input with the SharePoint File Input Tool? 

 

Some things I've tried.

-  Opening all files in a folder with SharePoint Input Files then filtering based on the metadata but if there are 100 files and you only need 1 that would involve opening too many unneeded files. 

- The Input Data Tool has a wildcard search feature but I can't replicate that in SharePoint either.

- OneDrive files via the Input Data Tool works in Designer but doesn't work once I upload to the gallery

21 REPLIES 21
MattBenj
9 - Comet

Hi @Jmarquez while I was developing my macro I tried setting it up so I could open file from multiple locations, unfortunately I started getting errors whenever I updated more than the file names. I didn't pursue this issue any further because requiring files to be in the same site/folder satisfied my criteria.

PrafulM
5 - Atom

Which variables do I need to replace with control parameters? I did filename, path value and item path value, but the files are not being read. The ITEM ID which seems to be a long hex string, is that also unique to the file? Where do I get that value?

 

Regards.

MattBenj
9 - Comet

@goutdelete the community wouldn't let me reply via private messages (said too many private messages sent - which is weird b/c this is the first time I've used that). But here are my answers to your message:

 

So a few observations.

 

- In my original post the Action tool uses the Replace a specific string feature. I don't see this in your screenshot.

- For the drop down I usually have to run the workflow once to get the drop down to populate

- Finally the list of files could be caused by your SharePoint tool configuration. This is how mine is set up. Do you maybe have "IMport only list of file paths" selected? 

MichMatt_0-1669206313968.png

 

 

goutdelete
8 - Asteroid

Thanks I think we just realized that we may've bumped into multiple problems.  We did pick/click the list because earlier when we select a file the result was empty -- but this may have been an issue with Sharepoint connector with CSV files:

 

goutdelete_0-1669222394527.png

 

I seem to see other people asking question but no solid solution provided yet here: SharePoint Files Input Tool - csv file - Alteryx Community

 

On the other hand, even if I use another folder and try with excel files, when I come back to the SharePoint connector workflow, the macro configuration just didn't pop-up anything for me.  I don't know where we did wrong though.

 

goutdelete_1-1669222558847.png

 

 

MattBenj
9 - Comet

Here are the instructions I provided to my users about creating the same macro in another team.

 

MichMatt_0-1669729096771.png

 

Anantha2403
5 - Atom

Hi @MichMatt  i have the same issue as yours and i am having issues creating the batch macro.
Below is the error i get while i am trying to process all the files in the folder.

Basically because of the change in the column names the files to follow after the first file is not getting read.

 

Anantha2403_0-1685011307585.png

 

Any inputs is appreciated. Thank you

MattBenj
9 - Comet

@Anantha2403 that is a pretty common batch macro error. Here is another post talking about how to fix it. Solved: Error message - Alteryx Community

Jeenia
5 - Atom

Hello Matt, 

 

Can you please share the Screenshot of your first Sharepoint tool like how I can specify which file to pick, I was able to build the macro with update value but how do I replace the string with because when I am taking file name from my local input it is giving me could not find url error. I don't need credentials but just want to see what are you selecting to get all file names or what are you passing to macro ?

MattBenj
9 - Comet

@Jeenia You can see it in my comments from 5/22/22.

bertal34
9 - Comet

@MattBenj 

 

Thank you for posting this and finding a solution!  I have one question: 

In your original post, you use the Directory tool which returns each file’s Create Date and Time.  Then use Summary tool to identify the file with max date.  How do you do this with the SP Input tool?  Mine does not return a Create Date field.

Labels