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.
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.
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. Smiley Sad
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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Tomorrow, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 98 members 4,222 guests
Please welcome our newest community members: