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 / Retrieving SharePoint ...
Power Apps
Answered

Retrieving SharePoint List ID after new form submission

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I want to return the ID of the inserted row back to my PowerApps screen so that I can then provide a link back to the app.

 

Is there some kind of function that will give me this ID? This is something I might expect to exist below.

 

Form.GetLastInsertedId()

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    Meneghino Profile Picture
    6,949 on at
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The LastSubmit only apples to the EditForm. I am creating a record from scratch using NewForm.

  • Meneghino Profile Picture
    6,949 on at

    I never use out-of-the-box forms, you can easily get the value by using Patch() to create a new record.

    Point 21 of this post gives an idea.

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

    Hi @Anonymous,

     

     

    Yes, the LastSubmit property only applies to EditForm.

     

    The EditForm has two mode, Edit Mode for record editing, and New Mode is used for creating new record.

    I think here you are using the New mode, but it should be the EditForm control.

     

    So if here you are trying to get the Server side ID once submitted by the EditForm control, this property would work.

    For how EditForm works, please check:

    Edit form and Display form controls in PowerApps

     

     

    Further, as @Meneghino suggested, using patch () function would also work. The patch () function would return the record that has been created, including the Server side field.

    Quoted:

    "The return value of Patch is the record that you modified or created. If you created a record, the return value may include properties that the data source generated automatically."

     

    Reference: Patch() function

     

    Regards,

    Michael

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am using the NewForm method as I am creating a new record in the SP list. It's basically a booking form. So I think the way to solve it would possibily this Patch function which you both mentioned.

     

    I will have a go later today and see how I get on.

     

    Thanks.

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 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard