Continuing from the last issue, I researched Sort and SortByColumns and delegation in detail.
- Delegation and Data Row Limit
- Advance preparations
- Case that is NOT possible to be delegated with “SortByColumns”
- Case that is NOT possible to be delegated with “Sort”
- Conclusion
- Extras1:It’s possible to delegate but the data limit influence the result when using “With”
- Extars2:Combination with non-delegable functions as “AddColumns”
- Related Articles
Delegation and Data Row Limit
Delegation means ” to leave the processing such as “Sort” and “Filter” to the data source”.
The idea is that it’s faster to have the data source deal with the process than bringing all the data to the Power Apps.
The “Data Row Limit” is the number of data (records) that Power Apps gets from the data source, and can be set to a maximum of 2000.
No more than the maximum amount of data will be loaded into Power Apps. Therefore, if you put large data into a variable or combo box, it will be got only the data equivalent to the limit you set.
However,“galleries” and “data tables” are an exception that can display data more than the data rows limit in case it it consists only of functions that can be delegated.
Advance preparations
Case that is NOT possible to be delegated with “SortByColumns”
Let’s see the result with SortByColumns function which is NOT able to delegate to data source.
Put an formula in the 2nd argument
※The gallery function cannot be used due to non-delegatable formula, and the “FFFF” item which should appear at the top of the list is not displayed because it hits Data Row Limit.
Well, it’s fine to write two or so…. but when there are more conditions, it’ll be hard for both reading and writing.
Put an formula in the 3rd argument.
※Records with column “Num” 6 won’t be displayed due to the sorting is done after bringing the data.
I know it is a rare case to specify a table to be passed, but you should be careful that there is no warning about delegation.
Case that is NOT possible to be delegated with “Sort”
Next, we’ll seethe case that is NOT possible to be delegated with “Sort”
Include an formula in the second argument.
When you want to delegate the processing to data source and still want to use any functions,“Sort” by itself can only do specifying one column, the same thing as “SortByColumns”.
Include object type properties in the formula
※Probably because “. “is the operator that accesses the property.
Conclusion
So,when you want to sort while keeping delegation, both “Sort” ane “SortByColumns” would be influenced by ristrictions.
When you need sorting to handle a large data, note that it would be unexpected result without care for delegation.
※Thare mey be other issues or cases that caused by delegation.
Extras1:It’s possible to delegate but the data limit influence the result when using “With”
Note that even if you do not use the value you put into a local variable in With, it will be affected by the data row limit.
Extars2:Combination with non-delegable functions as “AddColumns”
You need to consider “what kind of data you want to display” or “what kind you don’t need “.
コメント