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

Notifications

Announcements

Community site session details

Community site session details

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

Update Item from Form

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

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,325 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard