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 Apps
Answered

Delegation Warning

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    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. 

  • tommyvtran1 Profile Picture
    12 on at

    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

  • mdevaney Profile Picture
    29,991 Moderator on at

    @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 at

    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)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @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."

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @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. 🙂

  • tommyvtran1 Profile Picture
    12 on at

    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?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard