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 / Select Folder in Docum...
Power Apps
Answered

Select Folder in Document Library

(0) ShareShare
ReportReport
Posted on by 19

Hi,

 

I have an existing folder structure in my SharePoint library.

 

I'd like to setup a system to scan some old paper documents.

 

My idea is to place a barcode sheet on the top of each document. The scanner will scan the document and name it with the number from the barcode sheet and upload it to a holding library in SharePoint.

 

As the user is preparing the documents for scanning, I want them to enter the name of what the file will be in a SharePoint list as well as some other properties --- I'm all set with knowing how to do everything mentioned so far --- but here's what I'm not sure of - as one of the properties, I'd like the user to be able to select the folder that the document should be placed in when my flow runs to move it out of the holding library.

 

So - it is possible in PowerApps for the  user to just browse to a folder in a document library and select it, and have that path get entered in the list?

 

For example, my folder structure is as follows:

 

CustomerNumber1

      PrevoiusOrders

      Correspondence

               Incoming

               Outgoing

CustomerNumber2

      PrevoiusOrders

      Correspondence

               Incoming

               Outgoing

VendorNumber1

       ContactInfo

       Correspondence

                Email

                Incoming

                Outgoing

 

So, as you can see, it isn't consistent, it varies by the root folder name.

 

In this example, I have a paper document that I want to save and eventually save in VendorNumber1\Correspondence\Incoming

In another example, I have a paper document that I want to scan and eventually save in CustomerNumber2\PreviousOrders

 

So, again - is there a way to have them pick a folder as a field - in these two examples, "VendorNumber1\Correspondence\Incoming" and "CustomerNumber2\PreviousOrders"

 

I did try creating a PowerApp to test this, but it would only bring up SharePoint Lists, not document libraries (though I do want to create a list, and in that list have one of the columns reference the folder structure in a document library).

 

Thanks in advance.

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

    Hi @GMC111568 ,

     

    If my understanding is right, do you want to get the folder path, right?

    You can create a folder menu to select the folder and get its path by some Gallery, please check this:

    1. create the 1st Gallery, set Items property: 

    Filter('Document Library',IsFolder=true,'Folder path'="DocumentName/")

    2. create the 2nd Gallery, set Items property:

    Filter('Document Library',IsFolder=true,'Folder path'="DocumentName/"&Gallery1.Selected.Name&"/")

    3. create the 3rd Gallery, set Items property: 

    Filter('Document Library',IsFolder=true,'Folder path'="DocumentName/"&Gallery1.Selected.Name&"/" & Gallery2.Selected.Name&"/")

     

    Then you can use the code Gallery3.Selected.'Full Path' to get the selected the folder path.

    Snipaste_2020-05-26_10-29-28.png

    Hope this helps.

    Sik

  • JustITGuy Profile Picture
    12 on at

    HI Sik

     

    I don't think you understood the question, im stuck on the same thing as him. what he is saying is that he wants to upload images/files to a sharepoint document library but he wants to upload it to a folder that he selects in Powerapps. im trying to figure out the same thing but can't find any support or help about this.

     

    Kind Regards

    JustITGuy

  • LindaKDev Profile Picture
    38 on at

    Lol back to what I originally wrote, you have to save the BaseURL for the SP site in a variable and add that to Launch with Full Path.  like Launch(BaseURL & "/" & 'Full Path')

  • itssalunkhe Profile Picture
    2 on at

    Yes its achievable

    itssalunkhe_0-1666091628252.png

    the dropdown contents are straight away taken from SP list as:

    itssalunkhe_2-1666091755230.png

     

    the dropdown properties are as follows :

     

    itssalunkhe_3-1666091821248.png

    so we will get option in dropdown:

     

    itssalunkhe_1-1666091662691.png

     

    this will need small flow to work

     

    itssalunkhe_5-1666093742465.png

     

     

    and Upload Button code is:

     

    UploadToDynamicFolder.Run(Dropdown1.SelectedText.Value, First(DataCardValue19_3.Attachments).Name, First(DataCardValue19_3.Attachments).Value)

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard