cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ereyaz
Frequent Visitor

Using "in" operator in Filter function for binding drop down based on two tables

Hi Team,

 

I am using Azuer SQL server and power apps. 

 

I am binding a dropdown with below formula for showing Account Name based on two tables where account table contain accountid, accountname and accountaccess table contain accountid and userid:

 

Filter('[dbo].[Account]', AccountID in Filter('[dbo].[AccountAccess]', UserID = LoggedUser).AccountID)

 

Currently both tables contain few records so its binding correctly but when it will crossed beyond 500-2000(limitation of delegable) then it will not bind all data waht i read on delegable function for below messege on blue line of "in" operator.

   "Part of this formula cannot be evaluated remotely. right side of "in" operator is not a column name"

 

So can any one suggest how it will resolve the issue if tables contain 50,000 records or more.

 

Thanksa and Regards,

Reyaz

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi Reyaz

 

To overcome the delegation problem, I would recoomend that you create a view in SQL Server. You can then bind your dropdown to this view to overcome the delegation limit.

The view would look something like this...

 

CREATE VIEW [dbo].[AccountAccessView]
AS
SELECT Distinct ac.AccountName, aa.AccountID, aa.UserID
FROM
[dbo].[Account] ac
JOIN
[dbo].[AccountAccess] aa
ON ac.AccountID = aa.AccountID


The formula that you would use for your dropdown should hopefully avoid the delegation problem.

Filter([dbo].[AccountAccessView] , UserID=LoggedUser)

 

 

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi Reyaz

 

To overcome the delegation problem, I would recoomend that you create a view in SQL Server. You can then bind your dropdown to this view to overcome the delegation limit.

The view would look something like this...

 

CREATE VIEW [dbo].[AccountAccessView]
AS
SELECT Distinct ac.AccountName, aa.AccountID, aa.UserID
FROM
[dbo].[Account] ac
JOIN
[dbo].[AccountAccess] aa
ON ac.AccountID = aa.AccountID


The formula that you would use for your dropdown should hopefully avoid the delegation problem.

Filter([dbo].[AccountAccessView] , UserID=LoggedUser)

 

 

 

View solution in original post

ereyaz
Frequent Visitor

Thank you so much for the quick solution.

 

 

 

Thanks and Regards,

Reyaz

Sure, you're welcome!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,497)