cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AgarDoge
Helper I
Helper I

Accessing Attachment Control from SharePoint Document Library

Hi, 

 

I am developing a PowerApp where a user has the ability to upload attachments to a SharePoint List within a Document library which is within another folder. When I try to connect the list (AttachDocs) directly to PowerApps, it can't recognize it. I have to currently connect to the root folder then select the document library the list is contained in.

 

The way my SharePoint is set up is from the main site you can access the root folder (Documents), then from there select on a folder (AttachDocs) which contains a list of files that I want to be able to upload to. The columns of AttachDocs are Type (thumbnail), Name (contains hyperlink to actual document), and Modified By and Date. 

 

The SharePoint site I want to connect is https://x.com/sites/A/Documents/AttachDocs  

where https://x.com/sites/A/  is the main site, Documents is the Root folder/main folder, and AttachDocs is the Document Library/folder that has only a list of files. 

 

(1) Is there a way to directly connect the list of files or the Document Library to SharePoint?

(2) How do I extract the Attachment Control/do I need to add a new column to my SharePoint in order to have the attachment control visible? 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

I think you are confusing the ability to upload multiple attachments to a list item and the ability to upload files to a folder in a document library.  The attachment control isn't designed to work with document libraries or folders in document libraries.  It only works for the attachments field in a SharePoint list.  Since Document libraries are a special kind of list you can't use the attachment control with a document library.  Here's a walkthrough that shows how to upload files to a SharePoint document library using Power Automate and the attachment controls.  You'll see in the walkthrough that you have to add the control using a list and then unlock it. to use it for the document library.  PowerApps upload file to SharePoint document library - SPGuides



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

I think you are confusing the ability to upload multiple attachments to a list item and the ability to upload files to a folder in a document library.  The attachment control isn't designed to work with document libraries or folders in document libraries.  It only works for the attachments field in a SharePoint list.  Since Document libraries are a special kind of list you can't use the attachment control with a document library.  Here's a walkthrough that shows how to upload files to a SharePoint document library using Power Automate and the attachment controls.  You'll see in the walkthrough that you have to add the control using a list and then unlock it. to use it for the document library.  PowerApps upload file to SharePoint document library - SPGuides



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Thank you for sharing this information! One question I have is that do all of the users of the PowerApp need to have access to that SharePoint Library in order to upload? My intention is that any person at our company can fill out a form on PowerApps and attach documents to upload, but only I have permission to edit/view the SharePoint document library currently. 

If you are going to upload the files through Power Apps then yes everyone will need access to the document library.  One potential workaround would be to use MS Forms as the front end instead of Power Apps.  Once the form is filled out you can have a Power Automate flow that runs in your security context add the files and information to the library.  Users who attach the files to the MS Form would not need access to SharePoint that way.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,467)