The filter function becomes non delegable when filtering using the complex type lookup field in CDS and shows the blue dot...
in the above screenshot... the entity contains more than 2000 records, and to test the filter function i tested it against data that falls after the first 500 records and put only 5 records that meet the criteria in the first 500 records... and the result was only the first 5 records that are in the first 500!!!
i checked the delegation article in the documentation and could not find any information about this limitation in the filter function (which could also be present in other functions like lookup and sort!!)
so please guys... help us on this issue and recheck the documentation.
Thanks for the feedback.
Issue confirmed, lookup field is not supported delegation when working with Data Srouces, like CDS, SharePoint List.
I will collect this as a content request.
is there any updates in this issue?
i finished my app, and it contains lots of Filter functions... in which some times i have to use the lookup field this is an example:
Filter(MedReps, Active=true ,TeamLeader.PrimaryId=Label5.Text).MedRepName
which will have the blue dot and blue underline (under PrimaryId)!
and i have growing records of more than 150 per day, which means within afew days the data cannot be seen (at least using these functions)
so i kindly ask to prioritize the issue of delegation in CDS, and if this issue is solved... it is going to be a huge addtion to CDS and PowerApps.
How were you able to successfully filter on a lookup field? My formula below does not except '=' as a valid operator and 'in' or 'exactin' is not valid for the data type (where Project_TypeNew is the lookup field)
Filter(Projects, Active=true ,Projects.Project_TypeNew=SearchProjectInput.Text).Project_TypeNew
may be you should try the following:
Filter(Projects, Active=true ,Project_TypeNew.PrimaryId = SearchProjectInput.Text).Project_TypeNew
please let me know if it works! oterwise give more description on data structure and what you intend to do.
For whatever reason Power Apps does not recognize the "active=true" portion in your formula, so I removed it and got this:
Filter(Projects, ProjectType_New.Id = SearchProjectInput.Text).ProjectType_New
Now, what's interesting is there are no syntax errors. There is a warning that Id is numeric and SearchProjectInput.Text is text but the filter statements still does not yield any results.
Basically I have a list called Projects with a column called Projects.ProjectType_New. This is a lookup column with text values. I want to be able to filter on this so in essence the user can search by the values in the lookup column associated with a list item in the Projects list.
Thanks again for your help.
can you please provide more info on your situation:
1. is your data based on CDS?
2. if you provide some sample data and screenshot i might be more able to help.
I'm glad you asked if I was using CDS. Initially no, I was using SharePoint lists for which the formula never worked on a lookup field. When I use a CDS database I can use the following formula to search on a lookup field (with warnings of course)
Filter(Projects,Or(IsBlank(SearchProjectInput.Text),ProjectType in (SearchProjectInput.Text))
I think for support purposes I am going to continue to build my app using CDS moving forward. It seems to be more flexible. Now I am wondering if the 500 record search limitation applies to CDS data and my guess is 'yes' 😞
unfortunately the limitation of 500 records is for all data types... any how can you try the following formula:
Filter(Projects, ProjectType_New.Id in Search(ProjectType_New, ProjectInput.Text, "ProjectTypeName").id)
where the "ProjectTypeName" is the column name where the serch function should work (and it should of txt type) and if it works this also should work:
Filter(Projects, Active=true, ProjectType_New.Id in Search(ProjectType_New, ProjectInput.Text, "ProjectTypeName").id)
hope this works
Thanks for your ideas @mokhawaja.
Unfortunately I think the search function won't allow for searching on either a SharePoint lookup or a choice field. I tried your formula examples to no avail, so I tried simplifying the formula:
Search(Projects,"","ProjectType_New") generates an error on the ProjectType_New field "Wrong column type. Expects txt type". The text() syntax does not work either. If a replace the field ProjectType_New with a valid text field the search function works.
If in fact CDS allows for filtering on a lookup field, then IMO SharePoint should as well. How dissapointing. This field is a critical piece of data for my application.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights