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 / Bulk patch failed The ...
Power Apps
Answered

Bulk patch failed The requested operation is invalid. Server Response: Hours failed: The right side of the "Equal" operator must be a constant value

(0) ShareShare
ReportReport
Posted on by 603

Hi all,

 

I've an app build on dataverse where I try to patch multiple records from a collection in to dataverse.

Because I want to update existing records, I use this formula:

ForAll(col_HoursToApprove,Patch(Hours,LookUp(Hours,ThisRecord.HoursId = HoursId),{Approved:"Yes"}))

The collection is a complete copy of the hours table.

 

When I try this patch, I get the following error:

"The requested operation is invalid. Server Response: Hours failed: The right side of the "Equal" operator must be a constant value"

Categories:
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    @dennisb88 

    If you reverse the 2 parts of the equality operation, does that make a difference?

    ForAll(col_HoursToApprove,
     Patch(Hours,LookUp(Hours, HoursId=ThisRecord.HoursId),{Approved:"Yes"})
    )
  • dennisb88 Profile Picture
    603 on at

    Hi @timl ,

     

    Thank you for your reply. 

    No that make not any difference.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @dennisb88 ,

     

    Maybe you could try:

     

    ForAll(
     col_HoursToApprove As TableA,
     Patch(
     Hours,
     LookUp(Hours,TableA.HoursId = HoursId),
     {Approved:"Yes"}
     )
    )

     

    Best Regards,

    Bof

  • dennisb88 Profile Picture
    603 on at

    Hi @v-bofeng-msft ,

     

    Thanks, that's works like a charm!

     

    One further question, Why does this method works and the version I try not? It's the same data.

     

    Anyway thank you for your help.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @dennisb88 ,

     

    ThisItem and ThisRecord are great, but they only make the innermost record available.  In nested situations, it is impossible to reference the record in an outer scope. 

     

    I think this link will help you a lot:
    https://powerapps.microsoft.com/en-us/blog/formulas-thisrecord-as-and-sequence/

     

    Best Regards,

    Bof

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard