cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Meneghino
Level 10

"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
Community Support Team
Community Support Team

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.
Meneghino
Level 10

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.

Meneghino
Level 10

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.

Community Support Team
Community Support Team

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.
Meneghino
Level 10

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.

areid
Level 8

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.

KML
Level: Powered On

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

 

Hairy_Drumroll
Level: Powered On

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

18 months on, any progress?

KML
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,880)