cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samuelJ
Responsive Resident
Responsive Resident

(Delegation?) Can someone explain why this works.

Hi,

 

So this app uses various SQL Server tables as the source.  The table SalespersonMaster as over 500 records, about 700.  I have read delegation documents.  I thought using a filter happens on the sql server side and I can find one records out of the 700 using the below code.  It gives a delegation warning.  However the line above it works fine when I set the users email to a variable search that way.  

 

Just trying to understand if this a delegation issue and what it works one way and not the other. delegation.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@samuelJ 
User.Email() is something that PowerApps understands but the SQL datasource does not.  If you put it inside a variable it causes PowerApps to evaluate it and pass a 'fixed value' to the filter query thus avoiding delegation issues. 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User III
Super User III

@samuelJ 
User.Email() is something that PowerApps understands but the SQL datasource does not.  If you put it inside a variable it causes PowerApps to evaluate it and pass a 'fixed value' to the filter query thus avoiding delegation issues. 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

samuelJ
Responsive Resident
Responsive Resident

A great simple answer.  Thank you @mdevaney 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,008)