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
Solved! Go to Solution.
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.
Here's a doc about delegateable functions in sql server for your reference:
https://docs.microsoft.com/en-us/connectors/sql/
Best regards,
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.
Here's a doc about delegateable functions in sql server for your reference:
https://docs.microsoft.com/en-us/connectors/sql/
Best regards,
User | Count |
---|---|
252 | |
101 | |
94 | |
47 | |
38 |