web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / "in" operator as test ...
Power Apps
Unanswered

"in" operator as test of membership and its delegation

(0) ShareShare
ReportReport
Posted on by 6,949

According to the latest clarification in regards to delegation, the "in" operator is delegable for SQL server.

 

Also, according to the operator documentation, the "in" operator can be a test of "Belonging to a collection or a table" and not only a test for substrings within strings.

 

I have failed up to now to make this operator work with SQL server in the following syntax, as not only does it not delegate, but it gives an error as can be seen in the screenshot.

Filter('[Access].[Entities]', ID in [2, 3, 8, 2, 6])

AAA.png

 

This error however, is not given in this trivial case and the operator works as expected:

Filter([1,2,3,4,5,6,7,8,9], Value in [2, 3, 8, 2, 6])

 

Has anyone made the operator work with non-trivial data sources and/or in a delegable way as a test for membership?

 

I am grateful for any insight, since this is needed to join two tables.

 

I think the following may be interested in this question: @AmitLoh-Powerap, @v-micsh-msft, @csm, @AndyPennell, @hpkeong, @mr-dang

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at

    Hi @Meneghino,

     

    For the operator documentation, are you refering to the following document?

    Operators and data types in PowerApps

    Based on my understanding, the right part of the in operator should be one column belongs to the data source specified (here should be the Access table).

    For your second test, the right part should be considered as a string.

    Besides, there is a new blog published regarding delegation:

    Large SharePoint lists, Delegation details, Flexible height gallery, Validation with regular expressions, and more

    Regards

  • Meneghino Profile Picture
    6,949 on at

    Hi @v-micsh-msft

    Thanks for coming back to me.  Yes, indeed that is the operator documentation I am referring to, where in the middle of the page you find the following:

    __.JPG

    I am referring to the first usage of the in operator, as a test for membership.

     

    As you can see from my trivial example above, this operator works very well with cached data sources (i.e. collections) but I have not managed made it work with SQL server.

     

    As an aside, I would argue that the PowerApps team could have given the two operators different names to avoid confusion.

    I have read the blog, and that is what prompted me to check if delegation was effectively happening as advertised.

  • Meneghino Profile Picture
    6,949 on at

    Hi @v-micsh-msft

     

    Is there any update on this matter?

     

    I think @AmitLoh-Powerap would be interested also.

  • v-micsh-msft Profile Picture
    on at

    Hi @Meneghino,

     

    Currently not.

    Just from the Filter documentation, the formula you used for the Access table should work.

    I will forward this and see if the document could be updated.

    Thanks,

     

     

  • Meneghino Profile Picture
    6,949 on at

    Hi @v-micsh-msft is there any update on this?

    The in operator is still not delegated for SQL server even though the documentation says it is.  Also, there continues to be the error given that 'the right side is not a column", but it works as expected, so there is no error.

    Thanks.

    __.JPG

     

    PS @Anonymous may be interested in this thread.

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Meneghino for the link. I've edited my Idea so that it now requests delegation for the "in" operator.

  • Community Power Platform Member Profile Picture
    on at

    Is this fixed or not? I can't use the "In" to get the Filter delegated properly.

     

    Details: https://powerusers.microsoft.com/t5/General-Discussion/Filter-delegation-to-SQL-doesn-t-work-properly/m-p/137737#M47525

     

  • Hairy_Drumroll Profile Picture
    251 on at

    18 months on, any progress?

  • Community Power Platform Member Profile Picture
    on at

    Seems that delegarion IS NOT working correctly when you are connected to SQL server via "On-Premises Data Gateway"

    It should work correctly when you are connected to Cloud (Azure)

     

    It's a shame it's not mentioned in documentation by Microsoft.

  • Community Power Platform Member Profile Picture
    on at
    I am connected to azure SQL instance and it is NOT working. Well I have still under 500 rows, so I get just a warning.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard