Skip to main content

Notifications

Community site session details

Community site session details

Session Id : luEJhuTf3a+eBr4euObFRY
Power Apps - Building Power Apps
Unanswered

How to search in gallery

Like (0) ShareShare
ReportReport
Posted on 3 Aug 2023 09:10:56 by 62

Good day people,

 

Can you help me please about how to search in this gallery please? I tried in so many ways that I can't figure it out anymore.

Everytime i come with the "Search" command, files are no more displayed and I get error.

 

I'll attach photos. "Search" is for the Search bar, and I want to search for "NumeDoc" Label in the "glr_DIV" gallery.

 

Thank you

Categories:
  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on 03 Aug 2023 at 11:44:18
    Re: How to search in gallery

    If you are switching folders through icons then you should set a variable pointing to different folders based on your icon selection. this will look something like this.

     

    Set(currFolder, "FolderName")

     

    Then on your gallery item property add

     

    Switch(currFolder,
     "First Folder Name",
     "First Folder Data Source",
     "Second Folder Name",
     "Second Folder Data Source"
     // more conditions,
     // data sources
    )

     

    If you found my answer helpful, please consider giving it a thumbs-up or a like. Your feedback is greatly appreciated!

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • RaduR Profile Picture
    62 on 03 Aug 2023 at 11:10:47
    Re: How to search in gallery

    No, i want to display what's in that library and search in there.  I'm using icons to switch between folders.

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on 03 Aug 2023 at 11:02:24
    Re: How to search in gallery

    I don't quite understand your use case. Why are you filtering based on the folder path? You will only get the files that are in the folder you are connected to. Are you displaying files from multiple libraries?

  • Static Profile Picture
    118 on 03 Aug 2023 at 11:02:18
    Re: How to search in gallery

    Follow this pattern 
    Filter(datasource, TextSearchBox.Text in NumeDoc)

    Search( Table, SearchString, Column1 [, Column2, ... ] )

    Best Regards,
    Anton Nyrkov

  • RaduR Profile Picture
    62 on 03 Aug 2023 at 10:52:56
    Re: How to search in gallery

    Files in a Document Library in Sharepoint.

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on 03 Aug 2023 at 10:51:38
    Re: How to search in gallery

    Hi @RaduR,

     

    Which datasource are you using?

  • RaduR Profile Picture
    62 on 03 Aug 2023 at 10:31:11
    Re: How to search in gallery

    I am open to any recommendations. 🙂

  • Stacktor Profile Picture
    2 on 03 Aug 2023 at 09:53:34
    Re: How to search in gallery

    @Amik I hope it's okay if I come in between you two, but I have a Problem with your code. I can search the Gallery perfectly fine, but it is Searching Case Sensitive, so if I Have an Item that Name is "TABLE" it won't find the item when I Search "Table"

  • RaduR Profile Picture
    62 on 03 Aug 2023 at 09:21:19
    Re: How to search in gallery

    Sorry.

     

    SortByColumns(


    (Filter(

    'Documente in Vigoare',
    'Folder path' = CaleFolder
    ))
    ,

    "{IsFolder}",
    SortOrder.Descending,
    "{Name}",
    SortOrder.Ascending

    )

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on 03 Aug 2023 at 09:19:51
    Re: How to search in gallery

    @RaduR please share the code as text, not as an image.

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,695 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard