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 / ClearCollect file path
Power Apps
Answered

ClearCollect file path

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, when creating a collection in powerapp, is it possible to get s specific folder and not the full document library?

 

i.e. ClearCollect(colDocuments, "Documents/SMR Documents/SMR-0026/)

 

stujol80_0-1594572646422.png

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    A specific folder path cannot be stored as a Collection because it is not a table.  It’s a text string.  Therefore store it as a SET variable instead.

     

    Set(varDocuments, "Documents/SMR Documents/SMR-0026/“)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney  thanks for the reply.

     

    using a buttons OnSelect event,

     

    Set(varDocuments, "Documents/SMR Documents/SMR-0026"); ClearCollect(colDocuments, varDocuments)

     

    doesn't return the contents of the folder.

     

    stujol80_0-1594573752981.png

     

  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 
    You want to get all of the documents from a folder and store in a collection?  Sorry, I misunderstood your question.

    Use this code:

    ClearCollect(colDocuments, Filter(LibraryName,'Folder path' = "Documents/SMR Documents/SMR-0026/"))

     

    This old thread is helpful:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Filter-List-Document-Library-to-show-items-in-a-specific-folder/td-p/476704

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @mdevaney thank you.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard