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 / Search on SQL datetime...
Power Apps
Answered

Search on SQL datetime field

(0) ShareShare
ReportReport
Posted on by 68

Hi,

I'm trying to add a searchbox for a gallery that I can search on a SQL datetime field.  I'm getting a delegation warning.  Search is delagable for SQL and from what I can research, the datetime column type should work as well.  My gallery Items property is:

 

Sort(Search(Filter('[dbo].[ShiftDuty]', Last_Name = PName), SearchBox1.Text, "Date"), Date, Descending)

 

Trying to search on the "Date" field in the ShiftDuty table.  Is it the order of operations for the Sort/Search/Filter functions?


Thanks,
David

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

    Hi @Dpalmer ,

    Please notice that:

    Operation/Function Number Text Boolean DateTime Guid
    Filter Yes Yes Yes No [1] Yes
    Sort Yes Yes Yes Yes -
    SortByColumns Yes Yes Yes Yes -
    Search No Yes No No -
    Lookup Yes Yes Yes Yes Yes

    DateTime type is non-delegateable in search function.

    That's the reason why you met delegation problem.

    In all the functions that are used to search, datetime type is delegateable only in lookup function.

    So to not have delegation warning, you could use lookup function instead of search function, or change the Date datetime type to text.

    You could also consider save data in collection. Collection will not have delegation problem.

    What's more, if your record number is smaller than 2000, you do not need to worry about delegation problem.This  will not effect the app's performance.

    You just need to change the delegateable limit to 2000.

    delegation.jpg

     

    Here's a doc about delegateable functions in sql server for your reference:
    https://docs.microsoft.com/en-us/connectors/sql/

     

     

     

    Best regards,

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard