web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Submit form not pickin...
Power Apps
Unanswered

Submit form not picking up the ID of the last submitted itemwhen submitting to SharePoint

(0) ShareShare
ReportReport
Posted on by 25

Hi Guys,

I am running into an issue of late (which was working perfectly fine until recently, and broke all of a sudden).

What happens is that when I submit the form, the data isnt even flowing to the SharePoint list. There is no error, but the submission is not creating a entry in the SharePoint List anymore. 

vastestuser_0-1687945683869.png

 



My Intention is to  :
   -submit this form
   -get the row/entry created in the SP list
   -use the last submitted item's ID (from SharePoint) to pass as powerapps parameter to kick off a Power Automate flow

 

So I am just using a SharePoint as datasource for an Editform, and on the "OnSelect" of the submit button, I have the following formula

SubmitForm(EditForm1);
Set(myFormMode, View); --> I did this because as soon as I hit submit, the ID goes blank. I need ID because I am using this to fetch the last submit.ID which I need for use in the flow. But inspite of adding this code, it doesn't help 
'NewPortfolioChecklist-SendEmail'.Run() --> This is the flow I am trying to kick off,  once the form is submitted & the item gets created in the SP List. As this flow isnt even triggering, I tried to pass the ID field's datacard value , which is datacardvalue57 in the form. It still doesnt help.

Whats happening is that once submit, the ID field (the first field in the below powerapps form) goes blank, and maybe thats why the flow doesn't kick off. Ive tried to set form mode to view in the submit button formula, setting the mode to view in "onsuccess" property of form, etc.. Nothing works.


Here is the SP list, and the ID column (first column which is a default SP field of autonumber),  that I am trying to fetch upon form submission, as last submit ID.  It used to work before, not sure whats happening now. 

SP List.jpg

Categories:
I have the same question (0)
  • timl Profile Picture
    36,774 Super User 2026 Season 1 on at

    @vastestuser 

    I can't explain why this worked before and doesn't work now. However, the preferred and most reliable way to do this is to just call SubmitForm(EditForm1) in your button.

    In the OnSuccess property of EditForm1, you would then add the following code:

    'NewPortfolioChecklist-SendEmail'.Run(EditForm1.LastSubmit.ID) 

    The LastSubmit property will return the ID of the record and by adding the Flow to OnSuccess, it'll only run if and when the record saves successfully.

  • Dominik_Nau Profile Picture
    85 on at

    Hello @vastestuser ,

    I'm a bit confused. Is the Form (shown in the screenshot) set as "New" or "Edit". I'm asking because I'm wondering how you can have an ID "before" the item was created in the SharePoint List. As I can read, you expect to have a new entry in the SharePoint List. At the moment it sounds like you are editing something but not creating a new entry.

     

    When you want to fetch the ID OnSelect for the given button you could do it like:
    SubmitForm(EditForm1);

     

    For the Form: OnSuccess:

    'NewPortfolioChecklist-SendEmail'.Run(Form1.LastSubmit.ID);

  • vastestuser Profile Picture
    25 on at

    that didnt help unfortunately. Here are some properties/settings currently, if that helps

     

    Default mode of the editform1 --> New

    "OnSuccess" of the editform1 --> 'NewPortfolioChecklist-SendEmail'.Run(Editform1.lastsubmit.ID)

     

    Submit Button current formula --> Submitfform(Editform1);
                                                             Navigate(BrowseScreen1);

    Also Ive pulled in the "ID " field from the SharePoint list (Which is that default auto number field). When submitting the form using "Submit", theres no error. When I refresh the SP list, the item isn't creating. 

     

    Also fyi, I added some more fields (Datacards) to the form since the last time it worked, and the form has around 30 fields to submit to SP.  By any chance is there any limitation on number of datacards that can be in the form? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard