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
@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 !
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.
Select Multiple is "False"
yes I can use country field but it won't work all the time, the number of records will increase
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?
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...
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).
@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 ?
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?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.