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

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

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