Canvas Apps Controls

LastSubmit – How to fetch the last submitted record in Power Apps

Fetching the last submitted record in Power Apps
Fetching the last submitted record in Power Apps

Introduction

Edit forms can be used to edit or create new records. When doing so, users typically expect to see a confirmation when a form is submitted. One such example is getting the unique ID of the new record that was just submitted. To do so, use LastSubmit!

Tip - LastSubmit

In order to fetch the complete record that was just created (or edited), use the LastSubmit property. Once you submit a form, by say, using the SubmitForm function, you can fetch the last successfully submitted record with the help of the following expression:

FormName.LastSubmit

You can then store that record in a variable and access the values of any of the columns. To illustrate this, here is a quick demo:

LastSubmit of a form
LastSubmit of a form

To read more about the form control, click here.

Stay tuned for the remaining 14 tips!

Recent articles

  1. A-Z: 26 tips! Learn how to improve your Power Apps!
  2. Add Picture vs Camera Control – Who is the winner?
  3. Background images for Power Apps screens – the right way!
  4. Combo box or Dropdown? - Who is the winner?
  5. Delegation in Power Apps – How to identify and test!
  6. Edit vs Display – Which is the better form?
  7. Formulas – How to learn the 170+ Power Apps formulas?
  8. Galleries vs Data Tables – How to pick between the two in Power Apps?
  9. Hyperlinks – How to launch web pages & apps in Power Apps!
  10. Icons – How to increase performance!
  11. Jump start – How to speed up Power Apps dev with components!
  12. Keyboard – How to control the keyboard type on mobile