Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.
Announcement | We'll be doing maintenance between 2-3 hours, which may impact your experience. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

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

Dynamic file input & OneDrive/Sharepoint - Hardcoded Sharepoint Username

Jes
8 - Asteroid

Background:

1. I use many Sharepoint folders to input excel, csv, txt files via Directory Input & Dynamic Input tools and write to Sharepoint folders as well. 

 

2. I have yet to successfully figure out a way to read/write directly from Sharepoint portals. To get around this, I manually sync the Sharepoint folders to my computer and access the Sharepoint folders via Windows Explorer.

 

3. My colleagues have the same read/write access to the same Sharepoint folders that I have and will be running the Sharepoint dependent workflows that I develop on Alteryx. We do not have access to Alteryx Server.

 

Problem:

Not being able to connect directly to Sharepoint has some issues because the address of the folders has your user name embedded in the folder directory.

For example, my Sharepoint folder would say 'C:/JH0123/SharepointFolderName' whereas my colleague's Sharepoint folder would say 'C:/ColleagueUsername/SharepointFolderName'.

When I am building Alteryx workflows, my Sharepoint folder directories are being hard coded into Dynamic Input, Directory Input & Output tools, which can't be run by my colleagues.

 

To get around this, I added Interactive Tools so that the user asked to select their Sharepoint Username from a list of possibilities & this username then dynamically updates Sharepoint folder locations but this has taken a lot of work to build in.

 

Any suggestions on how I can easily dynamically input/download files & output files to/from Sharepoint without having to develop workaround for Sharepoint username dependencies in the workflow?

 

1 REPLY 1
danilang
18 - Pollux
18 - Pollux

Hello @Jes 

 

There is no direct way to read and write files directly from SharePoint.  The built SharePoint tools only work with lists and even with those, you can't download or write attachments.  

 

The solution that you've built is a good workaround.  Here's a couple of other options

  • Use in a formula tool use GetEnvironmentVariable("USERNAME") to read the logged in user's name from the environment variables
  • Add a UI text box called  __cloud:UserId (two underscores before cloud) and check the Hide Control (for API Development) option.  See this post for more details 

Dan

Labels