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 Apps / Viewing the contents o...
Power Apps
Unanswered

Viewing the contents of a document library in my app and being about to preview and download the files

(0) ShareShare
ReportReport
Posted on by 394

Hi all,

 

I want to create an app that allows me to show the content of the document library in my app allowing the user to view folders, be able to download or preview the files within the document library too

 

How would I go about doing this? Any ideas? I was thinking a gallery to view the documents in the Sharepoint library

 

Pleas help!

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @AB1 

    Yes, you would be able to do this in PowerApps.  However, in regard to Document Libraries - they usually grow to be quite large and in order to successfully show folders and their related files, you will have to rely on filters and other functions in PowerApps that are limited to a maximum of 2000 items.  Since the particular columns you will need to filter and search on are not delegable, you will get in accurate results.

    So, if you know your library will never be more than 2000 records, you can proceed.  But if you intend to have more than that in it, you should consider other ways to go about it (i.e. PowerAutomate to extend non-delegable columns into delegable columns).

     

    I hope this is helpful to get you started.

  • AB1 Profile Picture
    394 on at

    Hi @RandyHayes ,

     

    Thanks for the reply, We will not exceed 2000 results. How do I go about getting this up and running. After I connect the library what do I do after? Is it pretty easy? setting up a view of the library in power app? 

     

    Thanks again for your support 

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @AB1 

    You will need to focus on "IsFolder" to filter folders and then make use of the FolderPath properties to determine what is where.  But it is certainly achievable. 

    Note, you will receive delegation warnings for pretty much all you filter on, but as long as your Advanced Settings - Record Limit is more than the number of records you have in your library, you can ignore it.

  • AB1 Profile Picture
    394 on at

    Hi @RandyHayes ,

     

    How do I go about using the isfolder property? 

     

    When Im connecting my data course to powerapps it seems to be only allowing me to connect to the list rather than the library? Am i meant to be connecting to the list? 

     

    Thanks in advance

  • AB1 Profile Picture
    394 on at

    Hi @RandyHayes ,

     

    I don't seem to get anything here, even tho there are folders in this library.

    Screenshot 2020-09-15 at 8.30.01 AM.png

     

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @AB1 

    So, generally, you will first connect to your Library in your data sources.  If it does not appear in the list of "lists" in your SharePoint site, then you can type it in directly into the empty box in that list.

    To get you started - for your Gallery, you can use a formula like this:

    Filter(yourDocLibrary, IsFolder)

    Put a label in the Gallery and set the text property to ThisItem.Name and you should see all of the folders in your Library.

    This will show all of your folders in the library (note: all of them...not in a hierarchy)

    There's a lot more to do after this to get to an "explorer-like" experience.  There are some posts on this forum where people have done it fairly well.  

     

    A bit of advice though from an App perspective...if you can get away from the traditional explorer-like, hunt and find process for users, the better received your app can be.  With Document Libraries, you can establish Metadata on all of your files and capitalize on that for your app experience.   In example, if you are dealing with a Library of contracts, you can have customer information in the metadata and document types and status as well.  This way, a user of the app can choose a customer and then see a list of all of the documents associated with that customer and even filter down to the type of document and the status of the document...the possibilities are endless with this approach.  The other nice thing about this is that you typically end up filtering on columns in your library that are delegable - and thus no issues with delegation limits.  Just an extra $0.02 to keep in mind.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard