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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Showing Documents of S...
Power Apps
Unanswered

Showing Documents of SharePoint In PowerApp

(0) ShareShare
ReportReport
Posted on by 145

Hi,

 

I have an App with data source as CDS, where I want to Show the Documents Uploaded(Stored in Sharepoint) on the Particular Record and also add a Functionality to Add Documents to the Particular Record.

 

This is Sharepoint document Library for a particular Entity, 

Community14_1.png

 

The documents of Every Record is Saved in the folders,

Community14_2.png

 

Now, I want to Show the files uploaded in particular record in the PowerApps.

In my App, it showing every Document uploaded, regardless of which record it is.

 

Any help is appreciated.

Categories:
  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @tjalui ,

    Firstly, you need to put an identifier in the metadata of the document Library so it can be matched as belonging to the record.

    You can do this as part of the creation process and then filter the Library based on this identifier.

    I do something similar, except I name the base folder (as you do) with the same name as the key field (an file ID) as the item in the list. Below is a SharePoint Designer 2013 Workflow that automatically put this in a field in the metadata.

    VIDWorkFlow.png

     

     

     

     

     

     

    Happy to explain further.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • tjalui Profile Picture
    145 on at

    Sorry for the delay, I was busy in other projects.

    I am able to show the particular record, but I want to show the documents uploaded on that record.Community 10_1.png

    I am not able to show the documents which are present inside the folder.

     

    Any help is appreciated.

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @tjalui ,

    Firstly, my model was around filing documents and having the metadata automatically populated according to the folder structure, but using a SharePoint Workflow as shown - this will still work for you and put the folder name in a field in the Library, allowing a Filter to show the documents belonging to the record and works very reliably on any size Library.

    You can also populate this metadata reference with a Flow if this is how you file documents (and I do this with photos taken from mobile devices).

    There is another method you could use - note that this requires only one level of folders and there needs to be less than 2000 documents in the Library - the process below will pick up all characters after the first "slash" / and allow you to compare the result of this (which will be the folder name if there is only on one level) with the record name you have displayed. I am using a collection to avoid delegation issues with some of the filters (hence the 2000 item limit). So firstly, Collect the Document Library.

    ClearCollect(colDocs, YourDocumentLibraryName)

    Then in the Items of the Gallery I will use ReferenceFieldText as the name of the control in the form containing the CDS reference field.

    Filter(
     colDocs,
     StartsWith(
     Right(
     'Full Path',
     Len('Full Path') - Find(
     "/",
     'Full Path'
     )
     ),
     ReferenceField.Text
     ) && !IsFolder
    )

    Happy to elaborate further.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @tjalui ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • tjalui Profile Picture
    145 on at

    Hi,

    I couldn't get the app to show the documents.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard