cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DanielaHo
Level: Powered On

Quick question - LastSubmit()

Hi!

When users submit data via a NewForm, I generally like to show them the submitted data when NewForm.OnSuccess is true. So far I did this by passing the item data into a collection when the user clicks a button to SubmitForm(NewForm), then I display the data that is stored within the collection. However I am wondering if there is a better way, specifically using the LastSubmit() function.

 

But my question is:

Does LastSubmit() show the last record that was submitted as part of the app session or the last submitted item to the data source? 

 

The concern is of course that if the latter is true, the LastSubmit() function would not be ideal for solutions where multiple users submit nearly simultaneously.. 

 

Thanks! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Quick question - LastSubmit()

@DanielaHo 

You asked a very good question!  I am happy to tell you that LastSubmit will correctly retrieve the last record submitted during the current session.  This is beacuse LastSubmit is a property of the Edit Form.  It does not communicate with the datasource and therefore is not affected by when multiple users submit nearly simultaneously.

 

Here's the relevant section of the Form control documentation for reference.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-form-detail

 

LastSubmit – The last successfully submitted record, including any server generated fields.

  • This property applies only to the Edit form control.
  • If the data source automatically generates or calculates any fields, such as an ID field with a unique number, the LastSubmit property will have this new value after SubmitForm successfully runs.
  • The value of this property is available in the OnSuccess formula.

 

This confirms the last successfully submitted ID is stored in the Edit Form properties. Now you have it in writing! 

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Quick question - LastSubmit()

Hi @DanielaHo 

 

Last item submitted for that user session

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Super User
Super User

Re: Quick question - LastSubmit()

@DanielaHo 

You asked a very good question!  I am happy to tell you that LastSubmit will correctly retrieve the last record submitted during the current session.  This is beacuse LastSubmit is a property of the Edit Form.  It does not communicate with the datasource and therefore is not affected by when multiple users submit nearly simultaneously.

 

Here's the relevant section of the Form control documentation for reference.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-form-detail

 

LastSubmit – The last successfully submitted record, including any server generated fields.

  • This property applies only to the Edit form control.
  • If the data source automatically generates or calculates any fields, such as an ID field with a unique number, the LastSubmit property will have this new value after SubmitForm successfully runs.
  • The value of this property is available in the OnSuccess formula.

 

This confirms the last successfully submitted ID is stored in the Edit Form properties. Now you have it in writing! 

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,517)