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 / Patch error 8 constrai...
Power Apps
Answered

Patch error 8 constraint violation when patching Sharepoint item

(0) ShareShare
ReportReport
Posted on by 87

I am trying to patch a sharepoint list item but it is showing that the request is invalid, and I can't figure out why. 

Patch('VFRS App Vehicles', 
 LookUp('VFRS App Vehicles', 
 VIN = Reservation.VIN), 
 { Mileage: NewMileage});

VIN is a single line of text, Mileage is a number (might need to add .Value since NewMileage is a text box, but that doesn't fix my issue). I'm seeing that error 8 is a constraint violation, but I don't know why I would need to update any other fields if I just want to change one. 

Categories:
  • Verified answer
    Sundeep_Malik Profile Picture
    6,501 on at

    Hey @elbent 

     

    Are you trying to update a certain item/row in the database.

    Yes Patch can also be used but most of the time I get an error with Patch so I prefer UpdateIf over Patch.

     

    You can try something like below:

     

    UpdateIf(
    'VFRS App Vehicles',
    VIN = Reservation.VIN,
    { Mileage: Value(NewMileage.Text) }
    )

     

    I hope this helps 🙂

  • elbent Profile Picture
    87 on at

    Thanks, this got me what I needed!

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard