web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delegation warning whe...
Power Apps
Unanswered

Delegation warning when using With / Today construction

(0) ShareShare
ReportReport
Posted on by 241

Here's some unexpected behavior I encountered. When attempting to filter a (CDS) data source based on a date, I encountered a 'delegation warning'. After analysis, this turned out to be the result of a 'With' construction:

With({
 mindate: DateAdd( Today(), -7, Days )
},
 Filter( Projects, Datum >= mindate )
);

Is there any explanation for this?

I was poking around a bit, and it seems to be tied to only a With/Today() setup, as you can observe from the following screenshot:

dw.jpg
What's happening here?

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @MrNappa ,

     

    That is because the With and Today() functions and their interaction with the delegation capabilities of PowerApps. You should not use that function multiples times because that functions works locally and it will not work well if your entity filter query returns more than 500 records. My recommendation is to preload the today() value in a global variable or to create a collection only if you are working with + 500 records.

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • MrNappa Profile Picture
    241 on at

    Thanks for the suggestion. Yeah I know I can work around it, in fact I already did, but I found it curious that the same construct with With/Now() does not give any delegation problems while With/Today() does. Not sure if I were missing something subtle here.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard