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

How to get list item id in submit form?

Hello Geeks,

This might a silly question but I would really need solution for this?

 

How could I get the Newly created List item Id on SubmitForm(form1). Its would be good if I get this id in OnSuccess or any other way around.

 

I need this value in the PowerApps same form after it is submitted

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to get list item id in submit form?

Hi @Gopal,

 

You should be able to get the Last submitted Record with the LastSubmit property of the EditForm control.

For Example:

EditForm1.LastSubmit

To Get the Id, switch to:

EditForm1.LastSubmit.ID

Adding the document for reference:

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

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

EditForm and Display form controls in PowerApps

 

If you have any further questions, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
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

6 REPLIES 6
Community Support Team
Community Support Team

Re: How to get list item id in submit form?

Hi @Gopal,

 

You should be able to get the Last submitted Record with the LastSubmit property of the EditForm control.

For Example:

EditForm1.LastSubmit

To Get the Id, switch to:

EditForm1.LastSubmit.ID

Adding the document for reference:

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

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

EditForm and Display form controls in PowerApps

 

If you have any further questions, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
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

abd3127
Level 8

Re: How to get list item id in submit form?

Hello @v-micsh-msft @Gopal

 

i am using 3 forms in my app and at last on click of a button, the data source is updated by using this formula 

Patch(DataSource, Item_Being_Edited, Form1.Updates, Form2.Updates, Form3.Updates).

And i am navigating to next screen where i use form viewer
Here i want to display the last submitted forms value.

How can i do this??

alex3
Level: Powered On

Re: How to get list item id in submit form?

I am trying to view the ID in a new form after been submitted and the screen goes blank and saus "No data to display". Any suggestions for this mater?

abd3127
Level 8

Re: How to get list item id in submit form?

Hi @alex3

If you are using "SubmitForm(FormName)" to submit your data, use "FormName.LastSubmit.ID" to fetch the id and give to the form viewer on next screen.

alex3
Level: Powered On

Re: How to get list item id in submit form?

I tried it and still no luck. I added to the save button and it did not work. 😞
Beat
Level 8

Re: How to get list item id in submit form?

I have the same issue. I tried the following, where TargetRequest is the Item property of my DisplayForm in the OnSuccess event of the EditForm

 

If(
    EditForm1.Mode = FormMode.New, 
    Navigate(DetailScreen1,Fade,{TargetRequest: EditForm1.LastSubmit}),
    Back())

If I was in Edit Mode, it will go back to the detail screen from where I invoked Edit Mode.

But if I was in New Mode, it as well goes back to the Gallery from where I invoked the Add new item.

Why would it ignore the Navigate function?

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: 372 members 5,441 guests
Please welcome our newest community members: