I have a document library which stores multiple document sets, each for a client. In each document set there are multiple files.

In my powerapp, given client ID, how can I list files in a gallery of that client's document set?

The document library has a unique lookup column of client ID, which means one client can only have one document set in the library.

1 Answer 1


Please check the below solution.

I have a list named Clients with a column named "ClientID" which will be used for filtering the Documents in powerapp. This "ClientID" is a lookup column in the DocumentSetLibrary (Library which contains your documents inside document sets for each client).

enter image description here

A PowerApp is created which consists a gallery and an input search text box as shown below. Initially all the documents will be shown in the gallery.

enter image description here

In the input textbox, please remove the value in Default. You can add it to Hint Text if you want. Below are screenshots of the formula entered for the gallery Items.

In my case, the source to the gallery library that contains the document sets (DocumentSetLibrary).

I have filtered the "DocumentSetLibrary" using "IsFolder" because DocumentSet is nothing but a folder so to NOT display document set names in the gallery, the filter is applied as "IsFolder" = false

enter image description here

Run the app and try it.

enter image description here

Note: Please do not forget to replace names of library and fields, with names in your solution. Please upvote and mark as answer i it helps. Thanks.

To filter only in 1 document set use the below formula on the gallery

If(TextInput1.Text = "", Filter(DocumentSetLibrary, IsFolder = false), Search(Filter(DocumentSetLibrary, IsFolder = false && ClientID.Value = "Client ID which you want to search on"), TextInput1.Text, "{Path}"))
  • Is there a way to only search files in one document set?
    – Sheen
    Nov 6, 2019 at 14:09
  • check the updated answer Nov 6, 2019 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.