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 / Update column after su...
Power Apps
Answered

Update column after submit form

(0) ShareShare
ReportReport
Posted on by 147

Hi,

 

I am trying to get my app to work so that upon submission of a form, it updates the edited record with a flag to idenfity which records have been changed and which have not.

So I would have a column 'Edited Flag', which is automatically 0 (or just blank if that's not possible), and when a said record has been edited and the form submitted, this then get's changed to 1, to signify that this record has been changed.

 

I have been trying to use something like updatecontext, and set functions but can't find the correct formula. What would the formula need to look like?

 

Thanks.

Categories:
I have the same question (0)
  • Rahber Profile Picture
    1,935 on at
    How about on your form, you add an invisible label whose value will be always 1.

    And when you submit the form it will take the value 1 and update the source just like its updating the other fields in the form.

    So when you are adding a new Entry in Form the default value of label should be 0 and when editing it it should be 1.
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @atray13 

    Put this code in the OnSuccess property of the Edit Form

     

    Patch(your_datasource_name, LookUp(your_datasource_name, ID=Form1.LastSubmit.ID), {'Edit Flag': 1})

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • atray13 Profile Picture
    147 on at

    Worked thank you

  • webbedfeetmaest Profile Picture
    81 on at

    Thanks for this. Worked a charm.

  • andrejmfreitas Profile Picture
    10 on at
    Thank you! It worked as a charm.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard