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 / How to save the record...
Power Apps
Answered

How to save the record in a variable after Submitting a New Form

(0) ShareShare
ReportReport
Posted on by 61

The Item property of my form is varAuditSelected.

When I have the form in New Mode, and I submit the form for the first time, I would like to capture the new record that was created into the varAuditSelected variable so that I can immediatly start editing that record.

 

In other words i am trying to find a way to go from the creation of a new record straight to a form editing that record without going through a gallery selection first.

 

ideas?

Categories:
I have the same question (0)
  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @schuess2 ,

     

    You can potentially leverage the LastSubmit property of the form - this contains the last successful record saved to the source and, more importantly, any source-relevant/created data is returned as well - such as the ID of the record that something like SharePoint might auto-create for you.

     

    Let's assume you have two edit forms on the page - "MyNewForm" and a "MyEditForm" 


    You can use your MyNewForm's OnSuccess:  property to set EditForm(MyEditForm), the Item: of which can be set to 

    MyNewForm.LastSubmit 

    When you submit something on MyNewForm, the EditForm will automatically be populated with the newly submitted record.

     

    Hope this helps,

     

    RT

  • schuess2 Profile Picture
    61 on at

    @RusselThomas you rock!

     

    Took me a second to figure out how to use it. For anyone else that finds this post, Documentation is located here.  https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-form-detail (very little documentation)

     

    So what i did was Set my form items property to a variable

    then when i click a save button (no navigation attached)

    I use the OnSuccess property with the following:

    variable = FormName.LastSubmitt 

     

    outcome, the form automatically switches to edit mode. 

    thanks again. 

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard