When I use following syntax it gives me NO warning:
When I use following syntax it GIVES me a warrning and delegation is not working properly (not all rows are returned)
ClearCollect(collection,Filter('[dbo].[PA_VIEW_VW]',USER_EMAIL in otherCollection.emails));
This is not inline in the article that Filter() function CAN be delegated.
IS there any workaround to check for more than 1 value? The number of records in
is non deterministic - it can be 1 or 10.
The supported scenario for the in operator in SQL Server should be used as below, the right side of the in operator should be a column from the SQL Table:
Filter(DataBaseTable, "String" in Column)
Put the Column at the left side of the in operator is currently supported:
Filter(SQLTable, Column in [Values])
You may consider hold the SQL Table into a local collection, then do the filter as needed.
Unfortunately your answer is misleading for me - you present 2 examples with different approach and I'm confused which one is correct or when I should utilize in which moment.
Let me once again put examples with errors as above examples doesn't work for me.
Set(usr,User()); ClearCollect(backupScope,'[dbo].[PA_BackupScope_VW]'); ClearCollect(otherCollection,Filter(backupScope,BACKUP_TO=usr.Email));
//NOT WORKING - POWERAPPS BUG
ClearCollect(usrCustCat,Filter('[dbo].[PA_UserScope_VW]',USER_EMAIL in otherCollection.emails))
//Part of this formula cannot be evaluated remotely. Right side of "in" operator is not a column name.
ClearCollect(usrCustCat,Filter('[dbo].[PA_UserScope_VW]',otherCollection.emails in USER_EMAIL))
//otherCollection.emails - Invalid argument type. Cannot use Table values in this context/
//Delegation warning. This part "Filter" of this formula might not work correctly on large data sets. The data source might not be able to process the formula and might return an incomplete data set. Your application might not return correct results or behave correctly if the data set is incomplete.
Please note that I'm using on-premises gateway.
EDIT: I can't store '[dbo].[PA_UserScope_VW]' in a local collection as it has over 6000 rows.
Hope the confusion gets clarified whether SQL supports delegable operator for IN or not. Can you please update the documentation with the good set of examples of how it works.
Lots of forum answers/replies are misleading.
Will follow this post and watch for a solution by someone.
I developed a simple application and publish it. When i opened that app through my phone, I noticed that it has already a login page. So i thought , I would take those loginid and show data in the screen on the basis of loginid.
I am not Dynamics365 DataSource.
For this I used filter and Set currentuser details in the OnStart of the Screen1[Set(e,User())] and in the Screen1 I am using a Blank Vertical Gallery and I have written in the Items property [Filter(CustomerDeliveryStatusDatas_1,UserId=e.Email)]
I have the exact same issue. "CaseStatus" is a text column in the datasource.
Filter('[dbo].[Cases]',ComboBox1.SelectedItems.Value in CaseStatus && QueuePicker.Selected.QueueID = QueueID)
This line gives me the error "Cannot use table values in this context". If i swap the the column and the combo...
Filter('[dbo].[Cases]',CaseStatus in ComboBox1.SelectedItems.Value && QueuePicker.Selected.QueueID = QueueID)
...everything works as expected but i get the delegation warning.
If i change the combobox to a dropdown (or set "SelectMultiple" to false) everything works with delegation to SQL, so the problems is "in" but only in some cases.
Is this considered to be a bug or is it by design?
So here's my three filters ...
IGUID in '[dbo].[Q2_IA_UP_TGT]'.IGUID
'[dbo].[Q2_IA_UP_TGT]'.IGUID in IGUID
IGUID = 1
First gives delegation blue underline, second give table type red underline, and third works ok because it's "=" not "in".
Also, this is using Azure SQL, not DMG, so the issue seems to be the generic across both.
Check out new user group experience and if you are a leader please create your group
Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.