Skip to main content

Notifications

Community site session details

Community site session details

Session Id : FHAlRTPJ7kDZRWFXLWc2/l
Power Apps - Building Power Apps
Answered

Delegation Warning

Like (0) ShareShare
ReportReport
Posted on 7 Sep 2020 11:57:58 by 12

Hi,

 

I'm trying to solve a delegation warning from the following piece of code:

 

Filter(partnumbers, ID in [1, 2, 3])

 

Where partnumbers is a list that contains a column called 'ID'. I would like to return the rows that contain either an ID of 1, 2 or 3. However, I get a delegation warning about the 'in' statement. What is the reason why it throws a delegation warning.

 

Thanks in advance!

Categories:
  • tommyvtran1 Profile Picture
    12 on 07 Sep 2020 at 14:13:07
    Re: Delegation Warning

    Not quite. For example is instead 1-100. It could be that some numbers is missing so the ID>=1 And ID<=100, would not solve this problem. Let say I have a list [1,3,8,10]. I could use ID=1 Or ID=3 Or ID=8 Or=10. But of course when the last is larger, this is not sufficient. Is there anyone out there, that knows a more elegant way to bypass this problem?

  • CU-18081211-6 Profile Picture
    9,266 Super User 2025 Season 1 on 07 Sep 2020 at 14:05:25
    Re: Delegation Warning

    @mdevaney  please correct if i'm wrong, the documentation says:

     

    1. The SharePoint ID field for a table is a number field in Power Apps. However, SharePoint only supports the equal ('=') operation for delegation on an ID field.

    I never test it, just believe it. 🙂

  • Verified answer
    mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on 07 Sep 2020 at 13:54:58
    Re: Delegation Warning

    @tommyvtran1 
    If you want the numbers 1-to-100 to appear you should not use the IN operator.  Do this instead:

    Filter(partnumbers, ID>=1 And ID<=100)



    No, there is not any other option if you must use 'IN' instead. I am telling you the simplest way.  The 'IN' operator can only be delegated in SQL and CDS, not SharePoint.  You may read further info here:

    https://docs.microsoft.com/en-us/connectors/sharepointonline/

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • tommyvtran1 Profile Picture
    12 on 07 Sep 2020 at 13:48:13
    Re: Delegation Warning

    Is there another option? For example if I have a list with number 1 - 100. Using only 'OR' statements in not practical and inefficient. 

     

    Filter(partnumbers, ID=1 Or ID=2 Or ID=3 ... Or ID=100)
  • mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on 07 Sep 2020 at 13:33:13
    Re: Delegation Warning

    @tommyvtran1 
    To successfully avoid delegation you will need to use the OR operator like this.

    Filter(partnumbers, ID=1 Or ID=2 Or ID=3)

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • tommyvtran1 Profile Picture
    12 on 07 Sep 2020 at 12:14:49
    Re: Delegation Warning

    At least thanks for letting me know that it is not delegable to SharePoint.  For now I gave only a small example to compare with [1, 2, 3]. But how to deal with a large list, as "Filter(partnumbers, ID =1 || ID=2 || ID=3)" is not really practical

  • CU-18081211-6 Profile Picture
    9,266 Super User 2025 Season 1 on 07 Sep 2020 at 12:12:08
    Re: Delegation Warning

    Hi @tommyvtran1 ,

     

    Unfortunately, "in" operator is not delegable to SharePoint. 

    To solve your example:

    Filter(partnumbers, ID =1 || ID=2 || ID=3)

    but i'm sure that is not you are looking for. 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,751 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard