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

Form Last Submit ID is empty

i have a New Form of SharePoint list in power apps, when i am trying to get the ID of list item in success of Form as below.

NewScreenForm.LastSubmit.ID

but the above formula is giving empty result.

 

could you please help me on this.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Form Last Submit ID is empty

Hi @satya,

 

Could you please share a bit more about your scenario?

Further, do you want to get the ID of the last submitted form within a New form of your app?

 

If you want to get the ID of the last submitted form within a New form of your app, I think you have some misunderstanding on the LastSubmit property of the Edit form.

 

The Editform.LastSubmit formula would return the last successfully submitted record, you could access this property value within the OnSuccess property of the Edit form. If you open a New form within your app, the Edit form would be reset, so the Editform.LastSubmit.ID formula would return empty.

 

If you want to get the ID of the last submitted form within a New form of your app, you could consider take a try to store the last submitted form as a collection within your app, and then you could reference the Editform.LastSubmit property value through the collection.

 

I have made a test on my side, please take a try with the follownig workaround:

 

  • Add the following formula within the OnSuccess property of the Edit form control:
ClearCollect(LastSubmittedRecord,EditForm1.LastSubmit)

then you could reference the ID value of the last submitted form within your app using the following formula:

LastSubmittedRecord.ID

Note: If you firstly open your app, and have not submitted a form within your app, the LastSubmittedRecord collection is empty.

 

In addition, you could also take a try with the following formula to get the last submitted form data (record) within your app:

Last('20180904_case2')

Note: The '20180904_case2' represents the SP list within my app.

 

On your side, you should type the following formula:

Last('YourSPList')

If you want to refernece the ID value of the last submitted form data, please type the following formula:

Last('YourSPList').ID

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Form Last Submit ID is empty

Hi @satya,

 

Could you please share a bit more about your scenario?

Further, do you want to get the ID of the last submitted form within a New form of your app?

 

If you want to get the ID of the last submitted form within a New form of your app, I think you have some misunderstanding on the LastSubmit property of the Edit form.

 

The Editform.LastSubmit formula would return the last successfully submitted record, you could access this property value within the OnSuccess property of the Edit form. If you open a New form within your app, the Edit form would be reset, so the Editform.LastSubmit.ID formula would return empty.

 

If you want to get the ID of the last submitted form within a New form of your app, you could consider take a try to store the last submitted form as a collection within your app, and then you could reference the Editform.LastSubmit property value through the collection.

 

I have made a test on my side, please take a try with the follownig workaround:

 

  • Add the following formula within the OnSuccess property of the Edit form control:
ClearCollect(LastSubmittedRecord,EditForm1.LastSubmit)

then you could reference the ID value of the last submitted form within your app using the following formula:

LastSubmittedRecord.ID

Note: If you firstly open your app, and have not submitted a form within your app, the LastSubmittedRecord collection is empty.

 

In addition, you could also take a try with the following formula to get the last submitted form data (record) within your app:

Last('20180904_case2')

Note: The '20180904_case2' represents the SP list within my app.

 

On your side, you should type the following formula:

Last('YourSPList')

If you want to refernece the ID value of the last submitted form data, please type the following formula:

Last('YourSPList').ID

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

satya
Level: Powered On

Re: Form Last Submit ID is empty

hi, 

New Form on sucess event i am using the formula as below

ClearCollect(OpenApplicationsID,OpenApplicationsNewScreenForm.LastSubmit.ID)

an empty record is storing in the collections. and Last('Listname').ID is also not givingn last item id of list . it is giving the item id of some other item like if i have 1700 records, i deleted some records so due to this the last item id 6789 but  Last('Listname').ID is giving 5766.

 

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
Users Online
Currently online: 108 members 5,446 guests
Please welcome our newest community members: