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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter a gallery using...
Power Apps
Unanswered

Filter a gallery using a combobox with multiple values

(0) ShareShare
ReportReport
Posted on by 111

In my combobox, multiple values ​​are selected, how to select the values ​​that are in the combo and filter the gallery?

 

I need to select all lines where there are values ​​selected in the combobox

The error I receive is that they are incompatible types: Txt, Table, how to resolve it?

My code that doesn't work when I compare the EQUIPS column with the values ​​that are in the combobox

 

My Gallery

 

SortByColumns(
 Filter(
 TBL_CONTROLE_DIESEL;
 ID=txtAtendimento.Text || IsBlank(txtAtendimento.Text);
 EQUIPS= ComboBox3.SelectedItems || IsBlank(ComboBox3.SelectedItems)
 );
 "ID";
 SortOrder.Descending
)

 

JasonCastro_0-1699386134406.png

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    Hi @JasonCastro ,
    Assuming you are selecting multiple records in the Combo Box and EQUIPS is a Choice field (if Text you do not need .Value)

    SortByColumns(
     Filter(
     TBL_CONTROLE_DIESEL;
     ID=txtAtendimento.Text || IsBlank(txtAtendimento.Text);
     EQUIPS.Value in ComboBox3.SelectedItems || IsBlank(ComboBox3.SelectedItems)
     );
     "ID";
     SortOrder.Descending
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • JasonCastro Profile Picture
    111 on at

    @WarrenBelz Thx for the help, but, It looks like I can't use the ".Value" with the Equips column, give a error.

  • WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    @JasonCastro ,

    Then leave it off if EQUIPS is a Text column (as I noted)

  • JasonCastro Profile Picture
    111 on at

    @WarrenBelz wrote:

    @JasonCastro ,

    Then leave it off if EQUIPS is a Text column (as I noted)


    A new erros appears, now in the selectedItems: "Invalid schema, Expected a one-column table". Any ideas?

    Yes, the "EQUIPS" collum is a Text, and the combobox items are from a lookup column

     

    This is how I enter the data in the combo box:

     

     

    Set(varUserItens;LookUp(TBL_PERFIL_USUARIO; E_MAIL = userEmail).EQUIPAMENTS);;

     

     

     

  • Verified answer
    WarrenBelz Profile Picture
    153,026 Most Valuable Professional on at

    @JasonCastro ,

    If the Combo Box is Single Selection

    SortByColumns(
     Filter(
     TBL_CONTROLE_DIESEL;
     ID = txtAtendimento.Text || IsBlank(txtAtendimento.Text);
     EQUIPS = ComboBox3.Selected.Value || IsBlank(ComboBox3.Selected.Value)
     );
     "ID";
     SortOrder.Descending
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard