cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

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
Super User III
Super User III

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

Frequent Visitor

Thank you so much for the quick solution.

 

 

 

Thanks and Regards,

Reyaz

Sure, you're welcome!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (32,633)