web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Update Item from Form
Power Apps
Answered

Update Item from Form

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I have Form1.

 

I have SPList1.

 

SPList1 has a choice 'Status' column that is displayed in Form1.

 

In the 'OnSuccess' of Form1 I have an 'Update' formula that changes the content of the 'Status' column.

 

Since I am already in the 'OnSuccess' of Form1, displaying the relevant and associated data, do I STILL need to reference the 'ID' of that item in the update formula in order to update the 'Status' of said item?

 

Or, will this automatically only update the Status for the item currently displayed in Form1?

Categories:
I have the same question (0)
  • MudassarSZ365 Profile Picture
    591 on at

    Hi @Phineas ,

    You can try this 

    Patch(
     SPList1, 
     Form1.LastSubmit, 
     {'Status': "NewStatus"}
    )

    If you find this explanation helpful, please consider accepting it. 😊

  • Phineas Profile Picture
    5,331 Moderator on at

    If I have a button within Form1, that is NOT submitting the form, the following should update the 'Status', yes?
         Update('SPList, ID = Value(RequestFormItemID_DataCardValue.Text), {Status: {Value: "Approved"}})

    In the Form1 'OnSuccess' I currently have the following formula -
         Patch(SPList1, LookUp(SPList1,ID = Form1.LastSubmit.ID), {Status: {Value: Approved}})

    You're saying all I need is the following, yes?
           Patch(SPList1, Form1.LastSubmit, {'Status': "Approved"})

    Assuming all the above is true, both versions would work, yes?

  • Verified answer
    MudassarSZ365 Profile Picture
    591 on at

    @Phineas ,

    put this code on the onsuccess property of the form

     

    Patch(SPList1, Form1.LastSubmit, {Status: {Value: "Approved"}})

     

    If you want to use a button outside of the form submission process to update the 'Status', you should put tis code on the onselect property of the button

     

    Patch(
     SPList1, 
     LookUp(SPList1, ID = Form1.LastSubmit.ID), 
     {Status: {Value: "Approved"}}
    )

     

    Or, if you already have the ID available in a text input or data card value named RequestFormItemID_DataCardValue, you could use:

     

    Patch(
     SPList1, 
     LookUp(SPList1, ID = Value(RequestFormItemID_DataCardValue.Text)), 
     {Status: {Value: "Approved"}}
    )

     

    If this explanation is helpful to you, please consider accepting it. 😊

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 279 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 229 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard