cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AngryBatVoice
Level: Powered On

Delegation Warning with SQL back end

I'm getting a delegation warning on a LookUp with an Azure SQL data source.  I am trying to filter a gallery based on the selection of a dropdown list.  The lookup is the logical test in the Filter() and checks the selected department name against the DepartmentName field of the Departments table and returns the matching record's ID, then compares that ID with the DepartmentID field from the gallery's datasource (which is another table in the same Azure SQL db).  Here's the line that throws the delegation warning:

 

LookUp('[dbo].[Departments]',drpDepartment.Selected.Value = DepartmentName,ID) = DepartmentID

 

LookUp is supposed to be delegable with SQL, and I'm not filtering or manipulating dates, so I'm not sure why I'm getting the warning?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Sofie_D
Level 8

Re: Delegation Warning with SQL back end

You should put the value from the dropdown in a variable first.

Try: 
Set(varDepartment, drpDepartment.Selected.Value) ; LookUp('[dbo].[Departments]', varDepartment = DepartmentName,ID) = DepartmentID

2 REPLIES 2
Highlighted
Sofie_D
Level 8

Re: Delegation Warning with SQL back end

You should put the value from the dropdown in a variable first.

Try: 
Set(varDepartment, drpDepartment.Selected.Value) ; LookUp('[dbo].[Departments]', varDepartment = DepartmentName,ID) = DepartmentID

AngryBatVoice
Level: Powered On

Re: Delegation Warning with SQL back end

That got it, thanks!