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 Apps
Unanswered

Delegation Warning

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

Hope you are doing well.

 

DO you know how can i remove the delegation warning on the below code ?

 

 

Patch(PAT_Tracker_App_DailyProductivity, LookUp(PAT_Tracker_App_DailyProductivity,ID = Value(ChildGalleryRecord.lblSPTaskID.Text))

 

 

The delegation warning appear on the lookup with ID, do you think it's better to lookup with some others column than the ID ?

Categories:
I have the same question (0)
  • Gochix Profile Picture
    1,937 Moderator on at

    Hi,

     

    Looks like you have missed the end of the code or this is not the full code you provided?

    _____________________________________________________________________________________

    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Gochix,

     

    Exactly. Below the full code : 

     

    //===Filter and Patch Child Gallery items.
    ForAll(ParentGallery.AllItems,
    ForAll(
     Filter(
     AddColumns(
     ChildGallery.AllItems,
     //===Add a column for sum of Calls and Emails
     "CallsAndEmailsAndInvestigationSum", Sum(Value(Prod_inptCallsHandled.Text), Value(Prod_inptEmailsHandled.Text), Value(Prod_inptInvestigation.Text)),
     //===Add a column for sum of all SL inputs
     "SLsSum", Sum(Value(Prod_inptSL1.Text), Value(Prod_inptSL2.Text), Value(Prod_inptSL3.Text), Value(Prod_inptSL4.Text))
     ),
     //===Perform check: Calls + Emails is greater than zero
     //===Perform check: Calls + Emails = Sum of SL inputs
     CallsAndEmailsAndInvestigationSum > 0 && CallsAndEmailsAndInvestigationSum = SLsSum
     ) As ChildGalleryRecord,
     If(
     IsEmpty(Filter(PAT_Tracker_App_DailyProductivity,ID = Value(ChildGalleryRecord.lblSPTaskID.Text))),
     Patch(PAT_Tracker_App_DailyProductivity, Defaults(PAT_Tracker_App_DailyProductivity), 
    			{'Task Date': Text(Prod_DatePicker.SelectedDate, "dd/mm/yyyy")},
    			{'Agent Name': ChildGalleryRecord.lblAgentName.Text},
    			{'Agent Email Address': Text(PeoplePicker.Selected.Mail)},
    			{Country: ChildGalleryRecord.Prod_lblCountry.Text},
    			{Exception: ChildGalleryRecord.Prod_lblException.Text},
    			{Carrier: ChildGalleryRecord.Prod_lblCarrier.Text},
    			{'Calls Handled': If(IsBlank(ChildGalleryRecord.Prod_inptCallsHandled.Text),0,(ChildGalleryRecord.Prod_inptCallsHandled.Text))},
     {'Calls Reached': If(IsBlank(ChildGalleryRecord.Prod_inptCallsReached.Text),0,(ChildGalleryRecord.Prod_inptCallsReached.Text))},
    			{'Emails Handled': If(IsBlank(ChildGalleryRecord.Prod_inptEmailsHandled.Text),0,(ChildGalleryRecord.Prod_inptEmailsHandled.Text))},
     {Investigation: If(IsBlank(ChildGalleryRecord.Prod_inptInvestigation.Text),0,(ChildGalleryRecord.Prod_inptInvestigation.Text))},
    			{'Handled SL1': If(IsBlank(ChildGalleryRecord.Prod_inptSL1.Text),0,(ChildGalleryRecord.Prod_inptSL1.Text))},
    			{'Handled SL2': If(IsBlank(ChildGalleryRecord.Prod_inptSL2.Text),0,(ChildGalleryRecord.Prod_inptSL2.Text))},
    			{'Handled SL3': If(IsBlank(ChildGalleryRecord.Prod_inptSL3.Text),0,(ChildGalleryRecord.Prod_inptSL3.Text))},
    			{'Handled SL4 or more': If(IsBlank(ChildGalleryRecord.Prod_inptSL4.Text),0,(ChildGalleryRecord.Prod_inptSL4.Text))}
     ),
     Patch(PAT_Tracker_App_DailyProductivity, LookUp(PAT_Tracker_App_DailyProductivity,ID = Value(ChildGalleryRecord.lblSPTaskID.Text)), 
    			{'Calls Handled': If(IsBlank(ChildGalleryRecord.Prod_inptCallsHandled.Text),0,(ChildGalleryRecord.Prod_inptCallsHandled.Text))},
     {'Calls Reached': If(IsBlank(ChildGalleryRecord.Prod_inptCallsReached.Text),0,(ChildGalleryRecord.Prod_inptCallsReached.Text))},
    			{'Emails Handled': If(IsBlank(ChildGalleryRecord.Prod_inptEmailsHandled.Text),0,(ChildGalleryRecord.Prod_inptEmailsHandled.Text))},
     {Investigation: If(IsBlank(ChildGalleryRecord.Prod_inptInvestigation.Text),0,(ChildGalleryRecord.Prod_inptInvestigation.Text))},
    			{'Handled SL1': If(IsBlank(ChildGalleryRecord.Prod_inptSL1.Text),0,(ChildGalleryRecord.Prod_inptSL1.Text))},
    			{'Handled SL2': If(IsBlank(ChildGalleryRecord.Prod_inptSL2.Text),0,(ChildGalleryRecord.Prod_inptSL2.Text))},
    			{'Handled SL3': If(IsBlank(ChildGalleryRecord.Prod_inptSL3.Text),0,(ChildGalleryRecord.Prod_inptSL3.Text))},
    			{'Handled SL4 or more': If(IsBlank(ChildGalleryRecord.Prod_inptSL4.Text),0,(ChildGalleryRecord.Prod_inptSL4.Text))}
     ))))
     ;

     

     

    Everything works but i just have the delegation warning on the both below parts : 

     

    IsEmpty(Filter(PAT_Tracker_App_DailyProductivity,ID = Value(ChildGalleryRecord.lblSPTaskID.Text))
    Patch(PAT_Tracker_App_DailyProductivity, LookUp(PAT_Tracker_App_DailyProductivity,ID = Value(ChildGalleryRecord.lblSPTaskID.Text))
  • Gochix Profile Picture
    1,937 Moderator on at

    Try something like this:

     

    //===Filter and Patch Child Gallery items.
    ForAll(ParentGallery.AllItems,
    ForAll(
     Filter(
     AddColumns(
     ChildGallery.AllItems,
     //===Add a column for sum of Calls and Emails
     "CallsAndEmailsAndInvestigationSum", Sum(Value(Prod_inptCallsHandled.Text), Value(Prod_inptEmailsHandled.Text), Value(Prod_inptInvestigation.Text)),
     //===Add a column for sum of all SL inputs
     "SLsSum", Sum(Value(Prod_inptSL1.Text), Value(Prod_inptSL2.Text), Value(Prod_inptSL3.Text), Value(Prod_inptSL4.Text))
     ),
     //===Perform check: Calls + Emails is greater than zero
     //===Perform check: Calls + Emails = Sum of SL inputs
     CallsAndEmailsAndInvestigationSum > 0 && CallsAndEmailsAndInvestigationSum = SLsSum
     ) As ChildGalleryRecord,
     With({aLookup: LookUp(PAT_Tracker_App_DailyProductivity, ID = ChildGalleryRecord.lblSPTaskID)},
     If(IsBlank(aLookup),
     Patch(PAT_Tracker_App_DailyProductivity, Defaults(PAT_Tracker_App_DailyProductivity), 
    			{'Task Date': Text(Prod_DatePicker.SelectedDate, "dd/mm/yyyy")},
    			{'Agent Name': ChildGalleryRecord.lblAgentName.Text},
    			{'Agent Email Address': Text(PeoplePicker.Selected.Mail)},
    			{Country: ChildGalleryRecord.Prod_lblCountry.Text},
    			{Exception: ChildGalleryRecord.Prod_lblException.Text},
    			{Carrier: ChildGalleryRecord.Prod_lblCarrier.Text},
    			{'Calls Handled': If(IsBlank(ChildGalleryRecord.Prod_inptCallsHandled.Text),0,(ChildGalleryRecord.Prod_inptCallsHandled.Text))},
     {'Calls Reached': If(IsBlank(ChildGalleryRecord.Prod_inptCallsReached.Text),0,(ChildGalleryRecord.Prod_inptCallsReached.Text))},
    			{'Emails Handled': If(IsBlank(ChildGalleryRecord.Prod_inptEmailsHandled.Text),0,(ChildGalleryRecord.Prod_inptEmailsHandled.Text))},
     {Investigation: If(IsBlank(ChildGalleryRecord.Prod_inptInvestigation.Text),0,(ChildGalleryRecord.Prod_inptInvestigation.Text))},
    			{'Handled SL1': If(IsBlank(ChildGalleryRecord.Prod_inptSL1.Text),0,(ChildGalleryRecord.Prod_inptSL1.Text))},
    			{'Handled SL2': If(IsBlank(ChildGalleryRecord.Prod_inptSL2.Text),0,(ChildGalleryRecord.Prod_inptSL2.Text))},
    			{'Handled SL3': If(IsBlank(ChildGalleryRecord.Prod_inptSL3.Text),0,(ChildGalleryRecord.Prod_inptSL3.Text))},
    			{'Handled SL4 or more': If(IsBlank(ChildGalleryRecord.Prod_inptSL4.Text),0,(ChildGalleryRecord.Prod_inptSL4.Text))}
     ),
     Patch(PAT_Tracker_App_DailyProductivity, LookUp(PAT_Tracker_App_DailyProductivity,ID = Value(ChildGalleryRecord.lblSPTaskID.Text)), 
    			{'Calls Handled': If(IsBlank(ChildGalleryRecord.Prod_inptCallsHandled.Text),0,(ChildGalleryRecord.Prod_inptCallsHandled.Text))},
     {'Calls Reached': If(IsBlank(ChildGalleryRecord.Prod_inptCallsReached.Text),0,(ChildGalleryRecord.Prod_inptCallsReached.Text))},
    			{'Emails Handled': If(IsBlank(ChildGalleryRecord.Prod_inptEmailsHandled.Text),0,(ChildGalleryRecord.Prod_inptEmailsHandled.Text))},
     {Investigation: If(IsBlank(ChildGalleryRecord.Prod_inptInvestigation.Text),0,(ChildGalleryRecord.Prod_inptInvestigation.Text))},
    			{'Handled SL1': If(IsBlank(ChildGalleryRecord.Prod_inptSL1.Text),0,(ChildGalleryRecord.Prod_inptSL1.Text))},
    			{'Handled SL2': If(IsBlank(ChildGalleryRecord.Prod_inptSL2.Text),0,(ChildGalleryRecord.Prod_inptSL2.Text))},
    			{'Handled SL3': If(IsBlank(ChildGalleryRecord.Prod_inptSL3.Text),0,(ChildGalleryRecord.Prod_inptSL3.Text))},
    			{'Handled SL4 or more': If(IsBlank(ChildGalleryRecord.Prod_inptSL4.Text),0,(ChildGalleryRecord.Prod_inptSL4.Text))}
     ))))
     ;


    _____________________________________________________________________________________

    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    HI @Gochix,

     

    Thanks for this code.

     

    But it's not working, i have the following error message "Incompatible type for comparaison, these type cannot be compared : Number,Control

     

    I think it's referenced to this one

    With({aLookup: LookUp(PAT_Tracker_App_DailyProductivity, ID = ChildGalleryRecord.lblSPTaskID)}

     

    And i still have the delegation error message on the other part

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 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard