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
Answered

Patch Failed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

Currently, I am doing an update mode for a SharePoint List.

 

This is the code that I run on the "edit button",(updateusers is the variable)

image002 (2).png

This the code that I run on the "Save button"

image003 (2).png

When I run it, it showed me an error message and it didn't update the data

image001 (3).png

 

Why is this happening? Is there any way to solve this problem?

 

Thank you

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I can solve the first problem, as I forgot to add Text for the Text Input and it runs successfully but the problem is:

     

    When I start to update, it will create a row with the updated value in it instead of updating the specific row.

     

    This is the formula that I used at the "Save" icon.

    image004 (2).png

     

    This what happened, when I perform the update:

    1) I click on the 'Pencil' icon to perform the edit:

     image001 (6).png

    2) I start to perform the edit and click the "Save" icon after completing the update

    image002 (5).png

    3) After that, it does not update that specific item instead it creates a new row.

    image003 (4).png

     

    Why is this happening, is there any way to solve this problem?

     

    Thank you.

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

    Hi @Anonymous :

    Do you want to modify the specific record instead of add a new record?

    Is the data source of the gallery 'Peple that has acccess to data'?

    I assumue the gallery's items property is 'Peple that has acccess to data'.

    Firstly,let me explain why you can not modify the specific record.

    The key is that you need to use the record you need to modify as the second parameter of the Patch function.

    The correct syntax is:

    Patch( DataSource, BaseRecord, ChangeRecord1)

    Secondly,I suggest you try this code:

     

    Patch('Peple that has acccess to data',ThisItem,{'user ID':ThisItem.'user ID',Users:'Users input'.Text,'Scope of access':'Scope of access input'.Text})

     

    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

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