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 / Gallery filter formula...
Power Apps
Answered

Gallery filter formula comboboxes or text input

(0) ShareShare
ReportReport
Posted on by 88

I have the below formula on my gallery which mostly works.  I have 2 comboboxes and 1 text input box.  

 

Goal: filter the gallery based on selections in either of the comboboxes or text input box.  The formula works when the comboboxes and text input box are empty (it returns the list in its entirely).  Additionally, the gallery will filter when text is in the text input box.  However, my issue comes when making a selection in a combo box - the gallery will not filter. 

 

Additional Info: I have a clear selections button that OnSelect resets all the comboboxes and text box.  Upon clicking it successfully removes the selection.  Not sure if this is causing an issue as it resets.   

 

If(IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems)),'Standards, Disclaimers & Disclosures', Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in ComboBox1.SelectedItems.Result || 'Subject Matter or Content Topic(s)' in ComboBox2.SelectedItems.Result || TextInput1.Text in 'Required Language'))

Categories:
  • KrishnaV Profile Picture
    5,023 on at

    Hi @enlitzinger ,

     

    try this:

    If(IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems)),'Standards, Disclaimers & Disclosures', Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",") || 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",") || TextInput1.Text in 'Required Language'))


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more. 

  • enlitzinger Profile Picture
    88 on at

    Thanks @KrishnaV for the help but that formula is only working when all 3 (2 comboboxes and text input) have values in them.  It would be ideal to have them work when only 1 has values and the other 2 are blank.  Any advice?

  • KrishnaV Profile Picture
    5,023 on at

    Hi @enlitzinger ,

    Try this:

    If(IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems)),'Standards, Disclaimers & Disclosures',
    If((!IsBlank((TextInput1) && IsEmpty(ComboBox1.SelectedItems) && IsEmpty(ComboBox2.SelectedItems))) || (!IsBlank((TextInput1) && !IsEmpty(ComboBox1.SelectedItems) && !IsEmpty(ComboBox2.SelectedItems))),
     Filter('Standards, Disclaimers & Disclosures', 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",") || 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",") || TextInput1.Text in 'Required Language'))
    )

    Regards,

    Krishna 

  • KrishnaV Profile Picture
    5,023 on at

    Hi @enlitzinger ,

     

    The above formula works, if all are blank or text is not blank and combo boxes are blank.

     

  • enlitzinger Profile Picture
    88 on at

    @KrishnaV, regrettably same result as before.  Only working when both comboboxes and textinput have values within.

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @enlitzinger ,

     

    Please try this on

    Filter(
    'Standards, Disclaimers & Disclosures',
    If(IsEmpty(ComboBox1.SelectedItems),true, 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",")) ||
    If(IsEmpty(ComboBox2.SelectedItems),true, 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",")) ||
    If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language'
    )

    Hope this helps.

    Sik 

  • enlitzinger Profile Picture
    88 on at

    Regrettably receiving an error related to the last part of the formula:

     

    ||
    If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language'
    )

     

    It's stating 'an invalid number of arguments. Received 3 expected 1.

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @enlitzinger ,

     

    Sorry for my bad, I miss a ')' in the code, please try this:

    Filter(
    'Standards, Disclaimers & Disclosures',
    If(IsEmpty(ComboBox1.SelectedItems),true, 'Review Element(s)' in Concat(ComboBox1.SelectedItems,Result&",")) ||
    If(IsEmpty(ComboBox2.SelectedItems),true, 'Subject Matter or Content Topic(s)' in Concat(ComboBox2.SelectedItems,Result&",")) ||
    If(IsBlank((TextInput1),true, TextInput1.Text in 'Required Language')
    )

    Hope this helps,

    Sik

  • KrishnaV Profile Picture
    5,023 on at

    Hi @enlitzinger ,


    I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

    If you see any challenge/need further help let me know I am always happy to help.

    Regards,
    Krishna
    If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more

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 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard