Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Using filter delegable predicates and non-delegable predicates in conjunction

I'm creating an app that is connected to Dynamics 365 data. Currently I'm using Dynamics 365 connector but I can change that, if makes more sense to use the CDS connector going forward. 


I'm using the formula below to filter the items in the Gallery of my app:


    sem_owneremail = CurrentUser.Email,
    TextBoxSearch.Text in sem_dummyregarding || TextBoxSearch.Text in subject

I can see that the Filter function is on the list of Top-level delegable functions of both Dynamics 365 and CDS. Furthermore, looking at the list of Filter delegable predicates I can see that '=' is delegable to both Dynamics 365 and CDS - which is use in the first logical test of the formula.


However, 'in' (or 'StartsWith') is not delegable to either Dynamics 365 or CDS, which I'm using as the second logical test of the formula.


CurrentUser is a varibale set OnStart of the app. 


My question is now: 

How does these predicates work in conjunction with each other? Will the formula first evaluate the first logical test - e.g. check the email of the current user agains the records in Dynamics 365 (which is delegated to Dynamics 365) - and then run the second logical test (the search box - which is not delegated)? 




If not - is it possible to do it like that?


Right now I don't have enought test data to check it. However, it would make sense (at least to me), if Dynamics 365 could do the heavylifting by filtering the initials record set - and then the user could filter these records afterwards by using the search box.

Super User
Super User

Re: Using filter delegable predicates and non-delegable predicates in conjunction

I have no experience with dynamics but powerapps evaluates formulas from the inside out. However, you may get a delegation warning anyway if any part of the formula contains a nondelegatable function. It can be ignored if the data set doesn't exceed 2000 items.

Re: Using filter delegable predicates and non-delegable predicates in conjunction

adding in @aorth to assist with this question



Helpful resources


Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.


Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 186 members 4,723 guests
Please welcome our newest community members: