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 / CANVAS APP: Show docum...
Power Apps
Unanswered

CANVAS APP: Show document library contents (files) based on URL to that folder in SharePoint list

(0) ShareShare
ReportReport
Posted on by 33

I have a gallery connected to a SharePoint list named Clients. Within this list, there is a column [Type: Hyperlink] with a link to the client's folder living at [Documents/General/Library-Clients/[client name here] ].

 

I cannot seem to figure out how - when a client is selected in the gallery - to have their files show up in a gallery/or... below their data detail. Can someone lead me in the right direction perhaps? Screenshot attached.

 

The folder link is in a column called 'Client Folder' in the screenshot.

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @teaful :

    I'm not sure if I understand what you mean correctly, please help me point it out if there is an error:

    • There is a Hyperlink column named "Client Folder" in your SP list.
    • The value in The Hyperlink column is the value of "'Link to item'" of the file in Library.Some thing like:

     

    https://xxxx.sharepoint.com/sites/sitesname/libraryname/folder1/folder2/filename

     

    • You want to get a preview of the file through the Hyperlink column and display it.

    If so,You can find the specified file in the library through lookup, and then call its Thumbnail property to get the thumbnail of the file.I'v made a test for your reference:

    1\My SP list

    1.JPG

    2\My Library-picc

    3\Add a gallery and set it's items property to:

     

    ListA

    4\Add a image control into  this gallery and set it's Image proeprty to:

    LookUp(picc,Text(ThisItem.'Client Folder') in 'Link to item').Thumbnail.Medium

    The Result:

    3.JPG

    Best Regards,

    Bof

     

  • teaful Profile Picture
    33 on at

    @v-bofeng-msft , The link is actually to a FOLDER rather than an individual file. In my PowerApp, I have the need to display the contents of a folder based on the client chosen in a gallery. 

     

    the attached pic highlights what needs to happen. when clicking on a client, their details come up. The field you see called "Client Folder in Document Library" should have it's contents displayed in the attachments section. (Attachments is only there as a placeholder for now)

  • v-bofeng-msft Profile Picture
    on at

    Hi @teaful :

    Do you mean "Client Folder" is a link to a folder?Something like:

    https://XXXX.sharepoint.com/sites/SitesName/LibraryName/Folder1/Folder2

    If so,please try this solution:

    1\Add a gallery(Gallery4) and set it's items property to:

    ListA

    2\Add a gallery(Gallery3) and set it's Items property to

    Filter(picc,Gallery4.Selected.'Client Folder' in '{Link}',!IsFolder)

    3\Add an image control into Gallery3 and set it's image property to

    ThisItem.Thumbnail.Large

    38.gif

    Best Regards,

    Bof

  • teaful Profile Picture
    33 on at

    I'm getting an error unfortunately. I even tried creating a new 'client folder' column that was text only, but ended up getting the same error. (attached). Could it have anything to do with the fact that my folder is nested 3 deep within Documents?

  • v-bofeng-msft Profile Picture
    on at

    Hi @teaful :

    The key is that the library is cited incorrectly. Because the name contains the special character "-", you can try to use ‘library-xxx’ to refer to this library.Something like:

     

    Filter('Library-xxx',xxx in xxx)

     

    Best Regards,

    Bof

  • teaful Profile Picture
    33 on at

    Thank you v-bofeng! I'm glad to learn about the dash in a file name and the need for quotes.

     

    After adding the single quotes though, I received a different error saying that the item doesn't exist. Does this formula/process automatically search the "Documents" library that I have added as a connection, or do I need to put in the full path to the exact folder I need?

  • v-bofeng-msft Profile Picture
    on at

    Hi @teaful :

    Have you added this library as a data source?

    1.JPG2.JPG

    Best Regards,

    Bof

  • teaful Profile Picture
    33 on at

    Yes, I've connected to the parent folder called "Documents". The folder 'Library-Clients' lives WITHIN "Documents".  I can't seem to connect to anything but the parent folder. Should I be able to make a direct connection with Documents/General/Library-Clients?

  • v-bofeng-msft Profile Picture
    on at

    Hi @teaful :

    Could you give me some screenshots?

    Best Regards,

    Bof

  • teaful Profile Picture
    33 on at

    I have connected to "Documents", but in my filter I reference 'Library-Clients' which lives within Documents. I've screenshotted the path for you also.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard