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 / Get record ID from SP ...
Power Apps
Answered

Get record ID from SP list for a new record

(0) ShareShare
ReportReport
Posted on by 118

Hi,

I need an help where I want to pull the ID for the new record just created in SP list on Submit button action SubmitForm(newform1) so that I can add an additional function immediately after creation of the record.

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @shoebwk 
    You can get the ID number of the record created by SUBMITFORM using this code

    Form1.LastSubmit.ID

     

    Therefore, you can get the next ID number by doing this

    Form1.LastSubmit.ID + 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."

  • shoebwk Profile Picture
    118 on at

    Still figuring out how can I get the some variable data from the last record in the sendemailv2 functions.

    Eventually the Submit button will create a new record and send the email including some values from this record.

    Any help on the syntax much appreciated.

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @shoebwk 

    If you wanted to get a different column name, for example Column1, you could use this code.

     

    Form1.LastSubmit.Column1

     

    Here's an example of how to write and email:

     

    Office365Outlook.SendEmailV2(
     "recipientname@yourcompany",
     "Subject Line",
     "Body of text goes here<br>
     <br>
     ID: "& Form1.LastSubmit.ID &"<br>
     Column1: "& Form1.LastSubmit.Column1 &"<br>
     Column2: "& Form1.LastSubmit.Column2
    )

     

     

    ---
    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."

  • Verified answer
    ganeshsanap Profile Picture
    1,551 on at

    @shoebwk You can get the ID of newly created item using:

     

    newform1.LastSubmit.ID

     

    Similarly, you can get the other columns also from the LastSubmit like:

     

    newform1.LastSubmit.Title

     

    Additionally, you can set this values to variable like below and use them in your further functions:

     

    Set(lastItemTitle, newform1.LastSubmit.Title)

     


    Please click Accept as solution if my post helped you solve your issue. This will help others find the correct solution easily. It also closes the item. If the content was useful in other ways, please consider giving it 👍

  • shoebwk Profile Picture
    118 on at

    Thank you for the detail solution, I am almost there just struggling with the syntax. please help

  • shoebwk Profile Picture
    118 on at

    Sorted used office365Outlook.

    Is there a way to change the font and its size?

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard