cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

"in" operator as test of membership and its delegation

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

14 REPLIES 14
Highlighted
Community Support
Community Support

Re: "in" operator as test of membership and its delegation

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 express...

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Community Champion
Community Champion

Re: "in" operator as test of membership and its delegation

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.

Highlighted
Community Champion
Community Champion

Re: "in" operator as test of membership and its delegation

Hi @v-micsh-msft

 

Is there any update on this matter?

 

I think @AmitLoh-Powerap would be interested also.

Highlighted
Community Support
Community Support

Re: "in" operator as test of membership and its delegation

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,

 

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Community Champion
Community Champion

Re: "in" operator as test of membership and its delegation

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 @areid may be interested in this thread.

Highlighted
Advocate IV
Advocate IV

Re: "in" operator as test of membership and its delegation

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

Highlighted
Advocate I
Advocate I

Re: "in" operator as test of membership and its delegation

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-properl...

 

Highlighted
Advocate II
Advocate II

Re: "in" operator as test of membership and its delegation

18 months on, any progress?

Highlighted
Advocate I
Advocate I

Re: "in" operator as test of membership and its delegation

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.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,049)