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 / Is there any way to cr...
Power Apps
Answered

Is there any way to create subfolder in SharePoint Document Library by using Power Apps

(0) ShareShare
ReportReport
Posted on by 7

Hi there,

I have a question is about creating subfolder in SharePoint Document Library. My big challenge is my dynamic folder path. that means:

 

Root Folder: A, B

Sub Folder: A1, B1, B2, B3

 

I would like to create a sub folder under B3, if there is any way to let user choose which folder path will be applied instead of typing the folder path by manual. I research documentation in the internet, It seems that we can only put the folder path manually.

 

Thanks

 

Categories:
I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @wshuo_h ,

     

    I have made a test for your reference.

    1. Create a Flow:

    vyujincuimsft_1-1654767975709.png

    2. Here is my App.

    1) Add 2 Gallery Control.

    2) Add a Text Input Control.

    3) Add an Icon Control.

    Filter(Documents,'Folder path'="Shared Documents/")
    ThisItem.'File name with extension'
    ThisItem.'Folder path'
    Filter(Documents,'Folder path'="Shared Documents/"&Gallery4.Selected.Name &"/")
    If(!IsBlank(TextInput3.Text),CreateNewFolder.Run(Substitute(Gallery5.Selected.'Folder path',"Shared Documents","")&Gallery5.Selected.Name&"/",
    TextInput3.Text));Refresh(Documents);Reset(TextInput3)

    vyujincuimsft_0-1654767811183.png

    Result Screenshot:

    vyujincuimsft_2-1654768641688.png

    In addition, here are some links for your reference.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-view-subfolders-and-files-within-a-folder-in-a-document/td-p/425230

    https://www.matthewdevaney.com/power-apps-navigating-folders-subfolders-in-a-sharepoint-document-library/

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Use-form-to-create-a-new-folder-in-Document-Library/td-p/584854

     

     

    Best Regards,

    Charlie Choi

  • wshuo. Profile Picture
    7 on at

    Hi @v-yujincui-msft ,

    It seems to utilize the Gallery to get the current folder path. Is my understanding correct?? I also post another question in this forum <When we 'New' a Document Set : The requested opera... - Power Platform Community (microsoft.com)>. I have no idea if the Power Apps does not support my scenario. Thanks

     

  • v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @wshuo_h ,

     

    I added Documents as a data source. I can then display the root folder or sub folder by using the Filter() function in the Gallery's Items property.

    The Text Input Control is for entering the new folder name(you could also put it outside the gallery control).

    vyujincuimsft_1-1654826767911.png

    createnewfolder.gif

     

     

    Best Regards,
    Charlie Choi

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard