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 due...
Power Apps
Answered

Delegation warning due to DateValue function

(1) ShareShare
ReportReport
Posted on by 18
Hi,
 
I am trying to filter the gallery data based on date filter along with some other filters. Type of date column in SQL is Date. When I am bringing this as a dropdown, I am bringing it as text (as did not find another option). Now while I am using this in items property of gallery, it is throwing delegation warning, says 'DateValue part of this formula might not work on the large datasets'. Also, when I am choosing any date, neither it is throwing any error not it is giving any data because DateValue is returning time as well.
 
Please find the screenshots for reference:
 
1. 'cmbBDXDueDate' is a combobox for date but single select.
 
  
 
As soon as I add DateValue with this, it is returning time as well, due to which it is not able to match the data from SQL, hence returning blank
 
 
Also, as soon as I remove this date filter from the items of gallery, it works absolutely perfect, even returning more than 2k rows of data.
 
Any help is much appreciated.
 
Kind Regards,
Jyoti Bora
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Please always share your flow, always share the errors and details, and always share a picture with the specific sections of code underlined in error or warnings.
     
    Since I cannot see you expression what I type may need to change, hence why its important to share share share please :-)
     
    1) do you have more than 2000 records?
    2) Do you have the setting turned on to 2000 records for the App
    3) is the a Model or Canvas app
     
    Your Warning message
     
    Let's pretend that your filter is like this]
     
    Filter(MyDataSource, DateColumn = DateValue(myTextDate))
     
     
    Change it to
     
    With( 
         { MyDateValue: DateValue(myTextDate) },
     
     
         Filter(MyDataSource, DateColumn = MyDateValue)
     
    );
     
    Done
     
     
     
  • JB-07010546-0 Profile Picture
    18 on at
    @Michael E. Gernaey Thank you for your response and apologies for not adding the screenshots. I have now.
     
    To answer your questions
     
    1) do you have more than 2000 records?: Yes, but without using datefield, it is returning me those rows
    2) Do you have the setting turned on to 2000 records for the App: Yes
    3) is the a Model or Canvas app:  Canvas App
     
     
    Also, tried With function, same issue (delegation warning)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    You are not doing what I said. And you are adding stuff.
     
    I am looking at an Or which of course is going to give you that because the whole point is to not use that.
     
    If you want to NOT use the date if its not selected, don't add it there, add it above and separate
     
    I am so confused.. why you are adding datevalue to each side now.
     
    Anyway its drastically different. You cannot add a DateValue to a column and not have the warning. Because you cannot pass DateValue to the server, it has to be done on the client.
     
    But you cannot do that because you said you have more than 2000 records. So you have to change how you are doing it all.
     
    So changing it to what I said didn't get rid of the warning because you are creating a whole other warning.
     
    Also, you can do a DateValue and format it to not have the time.
     
    But if you are just comparing the Date (like today),
    Why are you converting to Dates at all if you store it as a string, just do a string comparison.
     
     
  • JB-07010546-0 Profile Picture
    18 on at
    Hi, 
     
    The issue is resolved now. As you suggested @Michael E. Gernaey , I used 'With' function but in a different way. First I used 'With' to filter the data at certain level and then I used that filtered data to further filter the data based on the dates. It is working fine without any delegation warning
     
    Kind Regards,
    Jyoti Bora

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard