web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / I'm receiving a delega...
Power Apps
Unanswered

I'm receiving a delegation warning for an If statement in my Application

(0) ShareShare
ReportReport
Posted on by 29

I'm receiving a delegation warning for an if statement in an application I'm working on. I believe that part of the problem is resulting from my use of the "in" operator which isn't delegable. I also seem to be getting delegation warnings for each and operator I'm using throughout as well. I would greatly appreciate any assistance in resolving my inquiry.

 

Here is the code I'm using:

 

SortByColumns(
Filter(
'TestRequestForm-UAT',
StartsWith(Title, txtTRTitle) && StartsWith(Requestor, txtRequestor) && StartsWith(TestRequestNumber, txtTRNum) && StartsWith(TestMainName, txtTestMain)
&&
(
Status = ddpStatus_4.Selected.Result ||
ddpStatus_4.Selected.Result = "Select Status"
) &&
(
If(
ddpStatus_9.Selected.Value = "Open",
Not(Status in ["Deleted", "Completed", "Cancelled"]),
If(
ddpStatus_9.Selected.Value = "Closed",
Status in ["Deleted", "Completed", "Cancelled"],
ddpStatus_9.Selected.Value = "Select Status"
)
)
) &&
(
'Test Type'.Value = ddpTestType_4.Selected.Result ||
ddpTestType_4.Selected.Result = "Select Test Type"
) &&
(
'Sub Type'.Value = ddpSubType1.Selected.Result ||
ddpSubType1.Selected.Result = "Select Sub Type"
) &&
(
ddpEngAsset.Selected.Result in 'Engineering Asset'.Value ||
ddpEngAsset.Selected.Result = "Select Eng Asset"
) &&
(
'Business Unit' = ddpBusinessUnit.Selected.Result ||
ddpBusinessUnit.Selected.Result = "Select Business Unit"
) &&
(
'ProjectPhase (ProjectPhase0)'.Value = ddpProjPhase.Selected.Result ||
ddpProjPhase.Selected.Result = "Select Project Phase"
) &&
(
'Department Number' = ddpDeptNum.Selected.Result ||
ddpDeptNum.Selected.Result = "Select Department Number"
) &&
(
ProjectNumber = ddpProjNum.Selected.Result ||
ddpProjNum.Selected.Result = "Select Project Number"
)
&& Not(Status in ["Draft","Deleted"])
),
"TestRequestNumber",
varSortDirection
)

Categories:
I have the same question (0)
  • jrletner Profile Picture
    720 Moderator on at

    For your backend, are you using Sharepoint or Dataverse? Each one has their own set of delegation issues. You can see them all here: Understand delegation in a canvas app - Power Apps | Microsoft Learn. To see if I can help figure out how to resolve your problems, I'd need to know which one you're working with.

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    hey @cwolfe01 

     

    please try this:

     

    SortByColumns(
     Filter(
     'TestRequestForm-UAT',
     StartsWith(Title, txtTRTitle) && 
     StartsWith(Requestor, txtRequestor) && 
     StartsWith(TestRequestNumber, txtTRNum) && 
     StartsWith(TestMainName, txtTestMain) &&
     (
     Status = ddpStatus_4.Selected.Result ||
     ddpStatus_4.Selected.Result = "Select Status"
     ) &&
     (
     If(
     ddpStatus_9.Selected.Value = "Open",
     Not(Status = "Deleted" || Status = "Completed" || Status = "Cancelled"),
     If(
     ddpStatus_9.Selected.Value = "Closed",
     Status = "Deleted" || Status = "Completed" || Status = "Cancelled",
     ddpStatus_9.Selected.Value = "Select Status"
     )
     )
     ) &&
     (
     'Test Type'.Value = ddpTestType_4.Selected.Result ||
     ddpTestType_4.Selected.Result = "Select Test Type"
     ) &&
     (
     'Sub Type'.Value = ddpSubType1.Selected.Result ||
     ddpSubType1.Selected.Result = "Select Sub Type"
     ) &&
     (
     ddpEngAsset.Selected.Result = 'Engineering Asset'.Value ||
     ddpEngAsset.Selected.Result = "Select Eng Asset"
     ) &&
     (
     'Business Unit' = ddpBusinessUnit.Selected.Result ||
     ddpBusinessUnit.Selected.Result = "Select Business Unit"
     ) &&
     (
     'ProjectPhase (ProjectPhase0)'.Value = ddpProjPhase.Selected.Result ||
     ddpProjPhase.Selected.Result = "Select Project Phase"
     ) &&
     (
     'Department Number' = ddpDeptNum.Selected.Result ||
     ddpDeptNum.Selected.Result = "Select Department Number"
     ) &&
     (
     ProjectNumber = ddpProjNum.Selected.Result ||
     ddpProjNum.Selected.Result = "Select Project Number"
     ) &&
     Not(Status = "Draft" || Status = "Deleted")
     ),
     "TestRequestNumber",
     varSortDirection
    )

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • cwolfe01 Profile Picture
    29 on at

    I'm using Sharepoint

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    did u try my above suggested code?

  • cwolfe01 Profile Picture
    29 on at

    I tried your solution, but the If statement at the beginning is still throwing a delegation warning.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard