Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 0BW8t1c+wwNpkObjmA7Wzd
Power Apps - Building Power Apps
Answered

Display all OneDrive folder names in a Power Apps Gallery

Like (0) ShareShare
ReportReport
Posted on 10 Feb 2020 11:06:56 by 32

I am trying to give users the possibility to choose a folder name from OneDrive, where they can save content.

Is there anyway to do it with the help of Flow and return all the folder names (Id) in a gallery or form or something so they can choose the folder they want?

  • Verified answer
    WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 13 Feb 2020 at 13:16:20
    Re: Display all OneDrive folder names in a Power Apps Gallery

    Hello @marketingandel ,

    This is not a Flow - it is a SharePoint Designer 2013 Workflow.

    I have dozens of them and if it is possible to automate things such as synchronising lists or triggering automations from SharePoint list changes  (we manage SharePoint directly, from PowerApps and a large amount from MS Access), these are preferred to Flows, particularly as they do not use Flow quotas and are very easy to write.

    The code, once you get used to it, is all “wizards” and drop-down lists and was all users had for SharePoint before Power Automate. There is also a tool called InfoPath that can still be useful.

    Happy to give you more information if required.

  • marketingandel Profile Picture
    32 on 13 Feb 2020 at 08:42:06
    Re: Display all OneDrive folder names in a Power Apps Gallery

    Hello again and thank you for getting back to me. Is it possible to get the actual flow screen shot ? Cant really figure out whats what in that picture. I'll try and read up some more about it and implement your solution and hope it works.

    Have a nice day

    Edit: The link to the article is not working.

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 13 Feb 2020 at 00:09:16
    Re: Display all OneDrive folder names in a Power Apps Gallery

    Hi @marketingandel ,

     I will now try and assist you further and add to the to the details in the previous posts on how we manage documents and photos in SharePoint.  I will start with two things - the first is the the SharePoint Work Flow below. It automatically sets metadata fields in SharePoint with the folder structure names in which it is filed. This one only does the first two levels (Class and Subject) but you could extend this as far as you needed. The other good thing about a workflow is that it does not use up your Flow quotas.

    SPFolderNames.png

    The other is adding a field called Thumbnail set to Hyperlink or Picture > Picture.

    This allows viewing of not only pictures, but also many document types mentioned previously Here is a good article on it.

    In the SharePoint views there are two options in Folders - show items inside them or without them (grouped by the metadata).

    I use a Datasheet view with files shown inside folders for new document filing. The user simply has to drag the file in and the category metadata is set by the workflow above. They also generally set a document description ,

    New records and general file maintenance can also be done in the local synchronised copy although it is better to create new folders in SharePoint.

    Once you have your files in SharePoint, they can be accessed in PowerApps galleries with thumbnails and filtered by any other reference you might have in the metadata (Photos for a job). This also works on mobile devices.

    Once you have absorbed all of this, I am happy to clarify anything else for you.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 11 Feb 2020 at 21:42:41
    Re: Display all OneDrive folder names in a Power Apps Gallery

    Hi @marketingandel ,

    Due to time zone, I may be a few hours before I put this together, however I will try to give you a roadmap of how to manage this effectively.

    I also have a SharePoint workflow (the “old” type in SharePoint Designer) which queries the folder structure and inserts the folder names into the SharePoint metadata, allowing both grouped / filtered views in SharePoint and similar galleries in PowerApps.

    There is also the ability to view file thumbnails (all images as well as Word, PDF and some other file type are supported) in both SharePoint and PowerApps.

    You can do the “transfer” in a number of ways, the easiest is probably to sync both facilities locally and copy the files. Be aware however of SharePoint “throttling limits, particularly if you are running something like the workflow I described at the destination.

  • marketingandel Profile Picture
    32 on 11 Feb 2020 at 13:58:54
    Re: Display all OneDrive folder names in a Power Apps Gallery

    So...should I just copy all my OneDrive folders to Sharepoint documents? Or is there a better way to mirror what I have in Onedrive to  a sharepoint document?

  • marketingandel Profile Picture
    32 on 11 Feb 2020 at 11:14:26
    Re: Display all OneDrive folder names in a Power Apps Gallery

    "The OneDrive files actually “live” somewhere on your corporate base site, however are accessible either through SharePoint, PowerApps or local OneDrive sync.

    I am happy to give you more information on this."

    This is what im after then. 

    As far as I know you let sharepoint sync to your PC or you let OneDrive share to your PC. It would be amazing to sync or map all I have in OneDrive to a sharepoint document library.

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 11 Feb 2020 at 11:10:55
    Re: Display all OneDrive folder names in a Power Apps Gallery

    Hi @marketingandel ,

    To sync, simply go to the SharePoint list and choose Sync from the top menu. It will create folders and files on your local drive the same as normal OneDrive folders and files and you can manage them locally. You can also choose Always Keep on this PC or not depending on the storage space you have and the size of the Library. This can be done at a folder level. If not kept on a PC, you are given an icon that will download the file if required.

    As mentioned, we manage all, of our files this way. Folders can be created at both the local and SharePoint level.

    PowerApps also interacts well with these Libraries and includes the ability to display thumbnails and pictures in galleries, including on mobile devices.

    Regarding your question on folders, you simply create them in the SharePoint library as above.

    The OneDrive files actually “live” somewhere on your corporate base site, however are accessible either through SharePoint, PowerApps or local OneDrive sync.

    I am happy to give you more information on this.

  • marketingandel Profile Picture
    32 on 11 Feb 2020 at 09:41:16
    Re: Display all OneDrive folder names in a Power Apps Gallery

    I see. Where can I see my OneDrive foolders in sharepoint ? Can I make it so that when a folder in onedrive is created a copy of the folder or a link to the folder is shown in sharepoint also. Because then I can use sharepoint as a data source and display them in powerapps. As of now I cant see my OneDrive folders in sharepoint when I open it.

  • WarrenBelz Profile Picture
    146,743 Most Valuable Professional on 11 Feb 2020 at 05:40:58
    Re: Display all OneDrive folder names in a Power Apps Gallery

    Hi @marketingandel ,

    Thank you also @eka24 for your contribution on the user security issues.

    I must apologise a little here - we do a lot of work with folders and files directly into OneDrive for different reasons, and I now realise that it may not map to your needs as ours are in the user's OneDrive and I assume yours are in a shared environment. I did a bit of research in both PowerApps and Flow and could not find anything allow management of OneDrive itself other than a user's own. You can connect to an Excel file in a shared folder by the owner connecting the app, but this is not much use to you.

    Firstly @eka24 , if you know something contrary to the above, please come into the discussion.

    All may not be lost however, the files and folders in SharePoint Document Libraries are actually in OneDrive (the metadata is a list with a URL link to the document) and you can sync them locally like any other OneDrive folder. Our company's entire file library is contained in these and managed like any other file/folder structure with the added ability to be able to add metadata and generate SharePoint views accordingly.

    If you can head down this track, happy to help and again my apologies

     

  • eka24 Profile Picture
    20,921 on 10 Feb 2020 at 12:27:20
    Re: Display all OneDrive folder names in a Power Apps Gallery
    While you deal with @WarrenBelz, you can also follow this post which I posted to one of our colleagues :
    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-create-unique-link-on-different-user-to-access-file-in/m-p/465102#M139245

    If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,083 Most Valuable Professional

Leaderboard
Loading started