HI @HansHeintz,
How many records stored in your SQL Table? More than 2000?
Based on the issue that you mentioned, I think this issue may be related to Delegation issue. When you load data from your '[dbo].[dier]_1' table into the CachedDieren collection, in default, it could only load 500 records from '[dbo].[dier]_1' table into the CachedDieren collection.
1) If the amount of your '[dbo].[dier]_1' table records is not more than 2000, please consider set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app, then you could load 2000 records at most from '[dbo].[dier]_1' table into the CachedDieren collection, then try your formula again, check if the issue is solved.
2) If the amount of your '[dbo].[dier]_1' table records is more than 2000, please check and see if the alternative solution mentioned within the following thread would help in your scenario:
https://powerusers.microsoft.com/t5/General-Discussion/Pulling-in-large-ish-SQL-tables/m-p/243777#M71518
Set the OnStart property of the App control to following (I assume that there are 10000 records stored in your SQL Table😞
Concurrent(
ClearCollect(col1, Filter('[dbo].[dier]_1', recordID >= 1 && recordID <= 2000)),
ClearCollect(col2, Filter('[dbo].[dier]_1', recordID >= 2001 && recordID <= 4000)),
ClearCollect(col3, Filter('[dbo].[dier]_1', recordID >= 4001 && recordID <= 6000)),
ClearCollect(col4, Filter('[dbo].[dier]_1', recordID >= 6001 && recordID <= 8000)),
ClearCollect(col5, Filter('[dbo].[dier]_1', recordID >= 8001 && recordID <= 10000))
);
ClearCollect(CachedDieren, col1, col2, col3, col4, col5)
Note: I assume that there is a Identity(1,1) column (e.g. recordID column) in your SQL Table to identify the row index.
then modify your formula as below:
ClearCollect(
ZoekDieren;
SortByColumns(
Filter(
If(!Toggle2.Value; '[dbo].[dier]_1'; CachedDieren);
eZoekTekst.Text in naam
);
"identificatie_nummer_asiel";
Descending
)
)
Or
ClearCollect(
ZoekDieren;
SortByColumns(
If(
!Toggle2.Value;
Filter('[dbo].[dier]_1', eZoekTekst.Text in naam),
Filter(CachedDieren, eZoekTekst.Text in naam)
);
"identificatie_nummer_asiel";
Descending
)
)
then re-load your app (fire the OnStart proprety of the App control), then check if the issue is solved.
Best regards,