Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

PowerApps filter gallery don't new item

Posted on by

Dear all, I'm new to powerapps I hope you can help me!

 

I have an application which is filtered by 2 combobox so I used the SORT and FILTER function in the gallery. 

My formula : 

 

 

SORT( FILTER('Source', ComboBox1.Selected in Model, Platform.Value in Combobox2.SelectedItems),ID,SortOrder.Ascending))

 

 

 

This work but not showing all records and new. If I remove the filter on combobox I can see all records... 

maybe I made a mistake in my filters?

 

Thank you 

Categories:
  • CU24080821-0 Profile Picture
    CU24080821-0 on at
    Re: PowerApps filter gallery don't new item

    @BCBuizer  ok sorry I understand ! you'r right in sharepoint my field is multiselect but I can't change it.

    So I find my solution I create specific filter with text input and when text input is empty then I use your workaround with prefiltering using country field. 

    Thank you for your help ! 

  • BCBuizer Profile Picture
    BCBuizer 21,956 on at
    Re: PowerApps filter gallery don't new item

    Hi @FRDSL ,

     

    The settings you are showing are for ComboBox1, but I was referring to the column settings of the Model column in your data source.

  • CU24080821-0 Profile Picture
    CU24080821-0 on at
    Re: PowerApps filter gallery don't new item

    Select Multiple is "False"

    yes I can use country field but it won't work all the time, the number of records will increase  

    FRDSL_0-1693255483731.png

     

  • BCBuizer Profile Picture
    BCBuizer 21,956 on at
    Re: PowerApps filter gallery don't new item

    HI @FRDSL ,

     

    To me this is an indicator that the Model column has multiselect enabled, which will make Model.Value return a table. Can you please confirm?

     

    If confirmed, are there any other columns that may be used to bring the number of items below 2000?

     

     

  • CU24080821-0 Profile Picture
    CU24080821-0 on at
    Re: PowerApps filter gallery don't new item

    I have an error : can't compare table, text in this line 

    Model.Value = ComboBox1.Selected.Value

     

    Just to understand why does it work when i filter using a text field ? For example I have a "Seller" field Iso I do DataCardValue.Text = Seller and it work... 

  • Verified answer
    BCBuizer Profile Picture
    BCBuizer 21,956 on at
    Re: PowerApps filter gallery don't new item

    Hi @FRDSL ,

     

    By delegation I mean the ability for the datasource to execute queries. If queries are not delegable, by default only the first 500 items will be included, a limit that can be raised to a maximum of 2000: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/delegation-overview

     

    Since you have more than 2000 items this will cause an issue. In case the Model column is a choice column and does not have multi select enabled, the below should help get around the issue:

    Sort( 
    	With({
    		_PreFilter: Filter(
    			'Source',
    			Model.Value = ComboBox1.Selected.Value
    		)},
    		Filter(
    			_PreFilter,
    			Platform.Value in Combobox2.SelectedItems.Value
    		)
    	),
    	ID,
    	SortOrder.Ascending
    )

     

    This works by pre-filtering the data using a delegable query (Model.Value = ComboBox1.Selected.Value) which should bring the number of items below 2000. Only then the non delegable query is performed (Platform.Value in Combobox2.SelectedItems).

  • CU24080821-0 Profile Picture
    CU24080821-0 on at
    Re: PowerApps filter gallery don't new item

    @BCBuizer thank you for your answer ! 

    I use SharePoint and I have 2500 records in the list. What do you mean by delegation ? not a issue with my filters ?

  • BCBuizer Profile Picture
    BCBuizer 21,956 on at
    Re: PowerApps filter gallery don't new item

    Hi @FRDSL ,

     

    The issue may be with delegation. Can you please share:

     

    -What data source are you using?

    - How many items are in your data source?

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard