Non-delegable function in PowerApps
In Power Apps, non-delegable functions are functions that
cannot be fully delegated to the data source for processing. When working with
large datasets or external data sources, it's important to be aware of these
functions as they can affect the performance and limitations of your app. Here
are some examples of non-delegable functions in Power Apps:
1. CountRows: The CountRows function returns the number of
records in a table or a collection. It is non-delegable because it requires
retrieving all the records from the data source to perform the count.
2. Lookup: The Lookup function is used to find a single
record in a data source that matches specific criteria. It is non-delegable
because it requires retrieving the entire dataset and searching locally for the
matching record.
3. First, Last, and Mid functions: These functions are used
to extract parts of a string. They are non-delegable because they require
retrieving the entire string from the data source and performing the extraction
locally in Power Apps.
4. Distinct: The Distinct function returns a unique set of
values from a column in a table or collection. It is non-delegable because it
requires retrieving all the records from the data source and performing the
distinct operation locally.
5. Concatenate: The Concatenate function is used to combine
multiple strings into a single string. It is non-delegable because it requires
retrieving and manipulating the strings locally in Power Apps.
6. Now, Today, and AddDays functions without a delegable
field: These functions are non-delegable when used without a delegable field as
an argument. For example, using Now() or Today() without a delegable field will
retrieve the current date or time locally in Power Apps instead of delegating
the operation to the data source.
It's important to note that the delegability of functions
can vary depending on the data source. While a function may be non-delegable in
one data source, it might be delegable in another. It's recommended to refer to
the documentation of your specific data source to understand the delegation
capabilities and limitations.
When working with non-delegable functions, it's crucial to
consider the performance impact and potential limitations, such as data
retrieval limitations or reduced app responsiveness. It's a best practice to
minimize the use of non-delegable functions or optimize your app's design and
data model to mitigate their impact on performance.