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

Community site session details

Session Id :
Power Pages - General Discussions
Suggested answer

Display Documents from document library

(1) ShareShare
ReportReport
Posted on by 112
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!
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,213 Super User 2025 Season 2 on at
    Display Documents from document library
     

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2