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

Search Formula Returning Delegation Error

(0) ShareShare
ReportReport
Posted on by 232

Hello,

 

The community here has helped me many times and I need it again.  I am building a search button for my app. When I plug the formula into my gallery I get a delegation warning. The search works but I wanted to see if there was something I could do so I do not get the warning anymore and ensure it works appropriately every time. I am searching multiple columns. My app is connected to SharePoint. The formula is below:

Search(
 'Activity Form',
 txtSearchBox.Text,
 "Locations",
 "CreatorEmail"
)

 

Any help would be greatly appreciated.

 

Thanks,

 

Collin

Categories:
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @collinktx - your code will work for a maximum limit of 2000 rows. Remember, a delegation warning is just a warning, not an error.

     

    The Search function is not a delegable function in SharePoint, but you could use the StartsWith function, which is delegable. However, StartsWith is delegable only with Text types. Another more obvious drawback is that this function only returns matching values based off the start of the search text.

     

    Amik_0-1692486860541.png

     

     

    There are no workarounds for functions which are not delegable. You can hide the message with workarounds, but the delegation will persist. However, the Filter function is delegable with SharePoint. If you can pre-filter your lists (such as using the With function) based on a specific criteria that will return less than 2,000 rows, you can then perform a Search function on that smaller subset of data. For example we could have population data that has 10,000 rows of people per district, but if we know that each neighbourhood within those districts will return less than 2,000 rows, it is ok to use a non-delegable function within that smaller subset using delegable Filters.

     

    Further reading: 

     

    https://www.practicalpowerapps.com/delegation/with-statement-managing-delegation/

     

    https://learn.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-operations-for-sharepoint 

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • collinktx Profile Picture
    232 on at

    Hi @Amik ,

     

    Thanks for the quick response. Just one follow-up question. Can I use the Filter function to search multiple columns? I was able to use filter for one column but could not figure out multiple. Maybe that is a limitation. Again thanks for the information and links. I am going to read up now.

     

    Collin

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @collinktx - yes you can certainly filter on multiple fields using the Filter function. Basic example below:

     

    Filter(
     'Your Data',
     'Text Column' = "Some Text", //text type
     'Single Choices Column'.Value = "Some Text", //single choices type
     'Date Column' < Today(), //date type
     'Yes No Column' = true, //yes no data type
     'Number Column' = 200, //number type
     'People Column'.Email = User().Email //people picker
    )
    

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard