Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Search for Multiple Criteria

(0) ShareShare
ReportReport
Posted on by

Hello,

I did try to word this once but I felt it was too confusing, so I will try a different way!

 

I have a Microsoft List, called Asset Manager. In my app, I have a gallery that filters based on a search. There are two columns in the Microsoft List I have that I want to connect to a search box. These are 'Asset Tag' and 'Room'.

I want the search box to filter for either a room or an individual asset tag.

 

For example, if I type in a room name, I want it to show me all of the assets connected to that room name in the gallery.

On the other hand, if I just wanted to find one individual asset, I could type that in and find it.

If there's nothing in the search box, I want all of the assets to show in the gallery.

HeronS98_0-1636633435167.pngHeronS98_1-1636633477425.pngHeronS98_2-1636633600016.png

Thank you in advance.

  • SH-23070720-0 Profile Picture
    on at
    Re: Search for Multiple Criteria

    Brilliant @StalinPonnusamy,

    It works flawlessly, thank you for your input!

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at
    Re: Search for Multiple Criteria

    Hi @HeronS98 

     

    Please verify the updated code above. I forgot to update on another place.

     

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at
    Re: Search for Multiple Criteria

    Hi @HeronS98 

     

    Please try this.

     

     

    With({SourceItem:'Asset Manager'},
    Sort(
     If(
     IsBlank(TextSearchBox1.Text),
     SourceItem,
     Search(
     SourceItem,
     TextSearchBox1.Text,
     "Location",
     "Title"
     )
     ),
     "Title"
    )
    )

     

     


    Thanks,
    Stalin - Learn To Illuminate

  • SH-23070720-0 Profile Picture
    on at
    Re: Search for Multiple Criteria

    I believe I may have found a solution, but it also comes with a delegation warning. The application still works but claims it may not like large data sets with the code I have used

     

    Sort(
     If(
     IsBlank(TextSearchBox1.Text),
     'Asset Manager',
     Search(
     'Asset Manager',
     TextSearchBox1.Text,
     "Location",
     "Title"
     )
     ),
     "Title"
    )

    Is there any way to remove the warning?

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,670 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