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.
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
Solved! Go to Solution.
Hey @MattBenj,
Have you tried creating a batch or iterative macro?
You could use this to dynamically loop through all the files found in your directory tool and update the input tool. Alteryx has some great videos on both types of macros for the steps how to do this.
@IraWatt Thanks for the idea. I used your batch macro idea and added a select tool to standardize the data type.
Nice! could be one to post on the Gallery if you wanted? Would be a useful tool.
I'll have to figure out how to clean it up since it is connected to my SharePoint and customer data. Here are some screenshots with details though.
Thanks for sharing the setup that will hopefully give others an idea of how to set it
I've asked another SharePoint question here: Render Tool and SharePoint - Alteryx Community
Hi @MattBenj, I'm facing the same problem as you descrive in your post. But I don't really find the way to fix it using the macro.
Could you please explain the process for a noob like me ?
Thanks in advance
Hi @Jmarquez the key to making this work is using the control parameter on the Batch Macro. This essentially adds an input anchor to the SharePoint tool. The workflow is hard to share since it's connected to my SharePoint environment but the key is configuring the Action tool so that it replaces the filename.
Here are some Batch macro resources that might help:
Getting Started with Batch Macros - Alteryx Community
Tool Mastery | Action action aktion (alteryx.com)
Macro Maynia: Macros...a piece of cake! - Alteryx Community
I will be on vacation from 5/20-5/30 so if you have additional follow up questions you won't hear from me for a while!
Hi @MattBenj thanks for pointing me to this material, was really interesting.
I setted up a macro ( actually a pair of macros) to make a handy way of replicating the dynamic input from directory. It worked out fantastic.
the issue comes when I try to create the input from a different site of the one used to configure the macro ( despite I'm passing the same parameters )
have you found a solution to make use of this usind different sharepoint sites?
I have opened a discussion about this with all the details of my issue.
Dynamicly input files from sharepoint files connector and diffrent sharepoint site
If you can take a look to it and give me some hints of where to work would be really aprreciated.
regards
Jorge