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])
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.
For the operator documentation, are you refering to the following document?
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:
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:
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.
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.
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.
PS @areid may be interested in this thread.
Is this fixed or not? I can't use the "In" to get the Filter delegated properly.
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.
Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200