web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Gallery Items
Power Apps
Answered

Filter Gallery Items

(0) ShareShare
ReportReport
Posted on by 3,295

Hi there.

 

Quick question here?

 

I currently have my gallery and is working fine. As you can see I can filter my gallery based in my dropdowns selection or my Radio1 selection.

 

Now As a default I have my Radio1 "Condo" so my gallery always is filtered with that condition.

 

I would like to have my gallery to show all of the items "Condo", House", "Comm". I I would like to filter my gallery if I select a City, a State and now a type.

 

but I could find the way to change my current formula.

 

Could someone please point me in the right direction?

 

 

sajarac_0-1621440519144.png

 

 

Search(    Filter(        Market,         (CboState.Selected.Result = Blank() || State = CboState.Selected.Result) && (CboCity.Selected.Result = Blank() || City = CboCity.Selected.Result)&& (CboZipCode.Selected.Result = Blank())),    (Type = Radio1.Selected.Value)),TextSearchBox1.Text,"Name")

 

 

Thanks in advance

 

Categories:
  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @sajarac ,

    Try this

    Search(
     Filter(
     Market, 
     (
     Len(CboState.Selected.Result) = 0 || 
     State= CboState.Selected.Result
     ) && 
     (
     Len(CboCity.Selected.Result) = 0 || 
     City = CboCity.Selected.Result
     ) &&
     (
     Len(CboZipCode.Selected.Result) = 0 ||
     ZipCode = CboZipCode.Selected.Result
     ) &&
    	 Type = Radiol.Selected.Value
     ),
     TextSearchBoxl.Text,
     "Name"
    )

     

    Please click Accept as solution 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 Thumbs Up.

  • Sajarac Profile Picture
    3,295 on at

    Hi @WarrenBelz , thanks for your help.

     

    That formula gives me :

    Invalid argument type (number). Expecting a Text value instead.

  • Sajarac Profile Picture
    3,295 on at

    I have added to my Radio the "All" choice. Would this make things easier?

     

    sajarac_0-1621461158911.png

     

  • Verified answer
    WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @sajarac ,

    Where is the error referring to - I was simply using the values you posted as I cannot see your data. If it is zipcode, you need

    Search(
     Filter(
     Market, 
     (
     Len(CboState.Selected.Result) = 0 || 
     State= CboState.Selected.Result
     ) && 
     (
     Len(CboCity.Selected.Result) = 0 || 
     City = CboCity.Selected.Result
     ) &&
     (
     Len(CboZipCode.Selected.Result) = 0 ||
     ZipCode = Value(CboZipCode.Selected.Result)
     ) &&
     Type = Radiol.Selected.Value
     ),
     TextSearchBoxl.Text,
     "Name"
    )

     

    Please click Accept as solution 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 Thumbs Up.

  • Sajarac Profile Picture
    3,295 on at

    Hi @WarrenBelz , please apologize. I didn't explain correctly.

     

    What I want is to be able to see the items in my gallery and be able to filter the gallery based in either

    City or State, Zip or Type.

     

     

  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Hi @sajarac ,

    When you refer to "either", the code I supplied will filter on all of them (if they have a value in the searching control)  - is this what you are wanting?

  • Sajarac Profile Picture
    3,295 on at

    Hi @WarrenBelz, for some reason I can not get both formulas working. I am getting errors.

     

    After several attempts I have partially this formula working. I mean partially because if I have selected in my Radio1 the option "All" my gallery shows "All" and I am able to also filter the gallery by state and/or city and Zipcode.

     

    But the TextSearchBox is not working.

     

    If(Radio1.Selected.Value = "All",
    Search(
    Filter(
    Market,
    (CboState.Selected.Result = Blank() || State = CboState.Selected.Result) && (CboCity.Selected.Result = Blank() || City = CboCity.Selected.Result) &&
    (CboZipCode.Selected.Result = Blank() || ZipCorrected = Text(CboZipCode.Selected.Result) ||
    Type = Radio1.Selected.Value)),TextSearchBox1.Text,"Name"),
    Search(
    Filter(
    Market,
    (CboState.Selected.Result = Blank() || State = CboState.Selected.Result) &&
    (CboCity.Selected.Result = Blank() || City = CboCity.Selected.Result) &&
    (CboZipCode.Selected.Result = Blank() || ZipCorrected = Text(CboZipCode.Selected.Result)),
    (Type = Radio1.Selected.Value)),TextSearchBox1.Text,"Name")) 

     

     

    PS/ Never mind, TextSearch is working fine. I am testing behavior. I will let you know.

    Thank you very much for your help.

     

    Regards

  • WarrenBelz Profile Picture
    156,720 Most Valuable Professional on at

    Thanks @sajarac ,

    Please let me know if the issue is solved for you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard