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 Combo Box with ...
Power Apps
Unanswered

Filter Combo Box with search and sort....fail

(0) ShareShare
ReportReport
Posted on by 33

I have been able to figure out search (on two different columns), filter (with two separate combo boxes using singular selection), and sort. This is being used on a Data Table.

However the minute I change the combo boxes to SelectedItems everything breaks. 

I have also been able to figure out filter (with two separate combo boxes using SelectedItems), and sort. But then if I add search back it breaks. 

 

Here is what I have for a singular option in the combo boxes. 

SortByColumns(Filter(Search('Scouting Data',SingleTeamSearchBox_4.Text,"cr15e_team","cr15e_team_name"),Division=DivisionFilterSingleTeamStats_4.Selected.Value||IsBlankOrError(DivisionFilterSingleTeamStats_4.Selected.Value),'Pick for Alliance'=PickFilterSingleTeamStats_4.Selected.Value||IsBlankOrError(PickFilterSingleTeamStats_4.Selected.Value)),"cr15e_eg_opr",SortOrder.Descending)

 

and here is what I have for selecteditems without search

SortByColumns(Filter('Scouting Data',Division in DivisionFilterSingleTeamStats_4.SelectedItems||IsBlankOrError(DivisionFilterSingleTeamStats_4.SelectedItems),'Pick for Alliance' in PickFilterSingleTeamStats_4.SelectedItems||IsBlankOrError(PickFilterSingleTeamStats_4.SelectedItems)),"cr15e_eg_opr",SortOrder.Descending)
 
How can I have Search, Combo Box Multiple Selections, and sort? Thanks. 
Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @MicroClueless - as I understand it.

     

    Your data source is Dataverse. You want to filter your Gallery control based on a Search function, together with two ComboBox controls configured to allow multiple selections.

     

    What are the data types of the "Division" and "Pick for Alliance" fields? (Single Line Text, Number, single-select Local or Global Choice, multi-select Local or Global Choice, LookUp etc).

  • MicroClueless Profile Picture
    33 on at

    Yes that is correct....

    DB=Dataverse

    Search=Use text box as search for two columns (both are single line of text. 

    Filter 1 = Combo box (multiselect) for "Division" is a Global choice column

    Filter 2 = Combo box (multiselect) for "Pick for Alliance" is a Global choice column

    Sort = "cr15e_eg_opr" is a decimal column

     

    Thank you very much

  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @MicroClueless -

     

    See below:

     

    SortByColumns(
     Filter(
     Search(
     'Scouting Data',
     SingleTeamSearchBox_4.Text,
     "cr15e_team",
    	 "cr15e_team_name"
     ),
     CountRows(DivisionFilterSingleTeamStats_4.SelectedItems) = 0 || IsBlank(DivisionFilterSingleTeamStats_4.SelectedItems) || Division in DivisionFilterSingleTeamStats_4.SelectedItems,
     CountRows(PickFilterSingleTeamStats_4.SelectedItems) = 0 || IsBlank(PickFilterSingleTeamStats_4.SelectedItems) || Pick for Alliance' in PickFilterSingleTeamStats_4.SelectedItems
     ),
     "cr15e_eg_opr",
     SortOrder.Descending
    )

     

    Note the Search function is not delegable, and although the In function is delegable in Dataverse, it is not yet delegable with Complex field types. 

  • MicroClueless Profile Picture
    33 on at

    There is less the 200 entries so that will be fine. 

    The code unfortunately did not work. Let me try to see what it is complaining about. I tried search by itself and that was fine. 

  • MicroClueless Profile Picture
    33 on at

    Unfortunately, it is saying "There is an error try revising the formula.". "The filter formula has some invalid arguments. 

    If I remove the Filter section it works. 

    Can you think of anything else I could try to remedy the error?

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @MicroClueless - please hover your cursor over the red line and take a screenshot.

  • MicroClueless Profile Picture
    33 on at

    There was two ' missing. Thank you so much. 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard