Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

PowerApps Delegation Starts With

(0) ShareShare
ReportReport
Posted on by 25

Hi all, I am having some issues with filtering. I understand that when using SharePoint as a data source I can only use = Or StartsWith as delegable fields. 

 

I am still receiving a delegation error when using starts with. 

Here is the formula - 

Filter(
'CRM Customer Portal',
If(
IsBlank(FilterTextName.Text),
false,
StartsWith(
'First Name' & Surname,
FilterTextName.Text
)
) && If(
IsBlank(FilterTextAddress.Text),
false,
StartsWith(
'Primary Address',
FilterTextAddress.Text
)
)
)

wardeee5_0-1625476397413.png

 

I am trying to have my gallery empty until somebody searches for a persons name or address. As there is 10000 records in the SharePoint List and I don't want to hinder the apps performance. Ideally I don't want to use = as I don't want people to have to type the entire address when searching.

 

Please let me know if I am doing something wrong?

 

  • wardeee5 Profile Picture
    wardeee5 25 on at
    Re: PowerApps Delegation Starts With

    Thank you very much, I have had a rethink and managed to think of a better way and no more delegation warning! Thank you for your help!

  • Verified answer
    CU-18081211-6 Profile Picture
    CU-18081211-6 9,261 on at
    Re: PowerApps Delegation Starts With

    Hi @wardeee5 

     

     To avoid delegation error, you need to rethink your formula a little bit. Something like:

    If( 
     IsBlank(FilterTextAddress.Text) || IsBlank(FilterTextName.Text),
     Blank(),
     Filter(
     'CRM Customer Portal',
     StartsWith(
     'First Name',
     FilterTextName.Text
     )
     && 
     StartsWith(
     'Primary Address',
     FilterTextAddress.Text
     )
     )
    )

     

     Hope it helps !

  • wardeee5 Profile Picture
    wardeee5 25 on at
    Re: PowerApps Delegation Starts With

    Hi,

     

    That is really helpful. So is my issue the IsBlank that is causing the delegation warning? In the Microsoft Document it has IsBlank as a non delegable field.

    wardeee5_0-1625478620418.png

     

    So to get around the warning should I just allow PowerApps to return the 500 records and then do the required filter? Instead of me wanting the gallery to be blank?

     

  • VenuR Profile Picture
    VenuR 12 on at
    Re: PowerApps Delegation Starts With

    Non-delegable limits

    Formulas that can't be delegated will be processed locally. This allows for the full breadth of the Power Apps formula language to be used. But at a price: all the data must be brought to the device first, which could involve retrieving a large amount of data over the network. That can take time, giving the impression that your app is slow or possibly crashed.

    To avoid this, Power Apps imposes a limit on the amount of data that can be processed locally: 500 records by default. We chose this number so that you would still have complete access to small data sets and you would be able to refine your use of large data sets by seeing partial results.

     

    You can read more about delegation warnings below

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview#delegation-warnings 

     

    Work around for the delegation warning is collecting the required data locally and then using the same collection  as a data source instead of SharePoint list

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard