Probably
Probably

Reputation: 426

PowerApps - Filtering SQL table on Collection Column

As the title says, I'm trying to filter a SQL table by the values in a collection. I'm attempting to use the Filter() function and an in formula to achieve this.

ClearCollect(NewCollection, Filter('SqlTable', ID in ExistingCollection.ID))

... where ID is a column belonging to 'SqlTable'.

I'm getting the error "Right side of 'in' operator is not a column name". My Collection 'ExistingCollection' has data in it, and the SqlTable also has data.

Possible issue may be the size of the Expenses table, it has 20k plus rows, but this filter should return a very small subset of that, ~200 rows. Am I running into the 5000 row limit here? Or is this kind of filtering not possible?

Upvotes: 1

Views: 2926

Answers (1)

Meneghino
Meneghino

Reputation: 1021

You can ignore the error message, as it is not correct. In any case it is not an error but a blue underline warning. This means that the query will not be delegated so that results will only come from the first 500 records of SqlTable.

You can test this by including in ExistingCollection.ID a value that is present in the first 500 records of SqlTable.

PowerApps documentation currently says that the in operator is delegated for SQL Server, but in fact it is not in the usage as a membership operator.

Please see point 5 of this reference.

The reference talks about Azure, but the same limitations apply to SQL Server.

Upvotes: 0

Related Questions