cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vandana
Helper IV
Helper IV

Bulk Update in foreach loop without delegate warning

I want to update in sharepoint list in for each loop without delegate warning

I have used below command. But it's giving me delegate warning.

 

ForAll(Filter(Gallery1_1.AllItems,Checkbox2_1.Value=true And Upper(FirstApproverLabel_1.Text)=Upper(User().Email)),Patch('Payment Requests',LookUp('Payment Requests',PaymentRequestID= PaymentReqIDLabel_1.Text),{Status:pendingApproval}));

 

How can i update without delegate warning

15 REPLIES 15
WarrenBelz
Super User
Super User

Hi @vandana ,

I will try to fix a couple of problems, then see how it goes. Firstly neither Upper and User()Email are not delegable., so two things - at App OnStart, do this

Set(
    vUserMail,
    User().Email
);
Set(
    vUserMail,
    Upper(vUserMail)
)

Then on your Text Control OnChange

Set(
    vApprover,
    Upper(FirstApproverLabel_1.Text)
)

then on its Default

If(
    !IsBlank(vApprover),
    vApprover,
    Parent.Default
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks. Delegate warning i am getting from control- PaymentReqIDLabel_1.Text

 

I am using grid. on the basis of few conditions. I am updating sharepoint list using 

PaymentReqIDLabel_1.Text column. Hope I am able to explain my problem

 

Hi @vandana ,

What type of field is this in your data source?

PaymentReqIDLabel_1.Text  is test field and status is lookup type field

OK @vandana ,

Your issues are bigger than Delegation - you cannot Patch a lookup field like that. It is a complex field type. Where is it getting the data from (pending approval sounds like a Choice field)

Its typo mistake. It's choice type of field

Ok @vandana ,

Instead of 

{Status:pendingApproval}

you would have

{
   Status:
   {Value:pendingApproval}
}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks

 

how can i remove that delegate warning, it' coming from PaymentReqIDLabel_1.Text

Thansk @vandana ,

What do you mean by a test field?  If you meant Text, this is Delegable. The name PaymentRequestID suggests a numeric ID.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,722)