web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Display Documents from...
Power Pages
Suggested Answer

Display Documents from document library

(1) ShareShare
ReportReport
Posted on by
Hello,
i have a document library that i used to upload attachments , im trying to develop a feature that allow use to edit form where i want to enable Add,Edit and Remove files from Attachment datacard . The attachment are stored in document library , i did try but its not working . 

Help me ! Thank you!
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    Super User 2025 Season 2 on at
     

    1. Use a SharePoint Document Library as a Data Source

    Make sure your document library is connected as a data source in Power Apps:

    • Go to Data > Add data.
    • Search for and add your SharePoint site.
    • Select the Document Library you're using for attachments.

    2. Create a Gallery to Display Files

    Use a Gallery control to show the files related to the current item:

    Items: Filter(DocumentLibrary, RelatedID = FormItemID)

    Replace RelatedID with the column that links the document to the form item.

    3. Add File Upload (Add) Functionality

    Use the Attach File control or a custom upload button:

    • Use UploadFile or Patch to send the file to SharePoint.
    • You can use Power Automate to handle the upload if needed.

    4. Enable Edit and Delete

    • Edit: You can open the file in a new tab or use a form to update metadata.
    • Delete: Add a trash icon with:

    Remove(DocumentLibrary, ThisItem)

    🏷️ Tag me if you have any further questions or if the issue persists.

    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

Last 30 days Overall leaderboard