Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Need code for the Gallery

(0) ShareShare
ReportReport
Posted on by 1,027
Dear Experts,
I have a textbox called SearchBox and 2 comboboxes called cbDepartment and cbJobTitle for selecting Department en JobTitle.
I need code for the Gallery to react when a search is entered in the SearchBox or a department or jobtitle is selected in the comboboxes.
What is the code. Can someone please help. Gr. P
  • Verified answer
    WarrenBelz Profile Picture
    148,691 Most Valuable Professional on at
    Need code for the Gallery
    I need to make a lot of assumptions here as you have not provided some necessary details. I am basing this on you using SharePoint as a data source, Department and JobTitle are Choice fields and you are using these choices in the Combo Boxes. You have also not stated the field you want to search with the search box.
    With(
       {
          _Data:
          Filter(
             SPListName,
             (
                Len(cbDepartment.Selected.Value) = 0 ||
                Department.Value = cbDepartment.Selected.Value
             ) &&
             (
                Len(cbJobTitle.Selected.Value) = 0 ||
                JobTitle.Value = cbJobTitle.Selected.Value
             )
          )
       },
       Search(
          _Data,
          SearchBox.Text,
          YourFieldToSearchHere
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
     
     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1