Forum Discussion

Deleted's avatar
Deleted
Sep 18, 2019

Populate PowerApps Dropdown With SP Library Files BUT Filter Out Folder Names

I have a SP document library with files and folders. I can setup a dropdown menu in PowerApps that will display all files in document library. Unfortunately it also includes folder names. How do I filter out the folder names so only file names will appear?

  • Any ideas will be greatly appreciated. 

    • Hi Deleted 

       

      I have not tested this in PowerApps (sorry, I don't have time just now), but in other applications (such as content rollup) when I need to filter out folder names, I apply a filter where Content Type is NOT Folder.

      Are you able to do that in this scenario?

       

      Sandy

       

      • Deleted's avatar
        Deleted

        Sandy Ussia  Thanks for the response Sandy!  In the dropdown menu's "Items" property, I had just the name of the SPO List. To filter out folder names from appearing, I used the following code:

         

        Filter('SPO LIST NAME', !IsFolder)

         

        This worked! I do get a yellow warning icon indicating "Delegation warning. The highlighted part of this formula might not work correctly with "IsFolder" on large data sets."

         

        One other question - How do I add a "Please Select a File" as the default item in my dropdown menu? 

Resources