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

ereyaz
Frequent Visitor

Thank you so much for the quick solution.

 

 

 

Thanks and Regards,

Reyaz

timl
Super User III
Super User III

Sure, you're welcome!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (18,456)