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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Form.LastSubmit functi...
Power Apps
Unanswered

Form.LastSubmit function is not working

(0) ShareShare
ReportReport
Posted on by 51
I am trying to use Form.Last Submit functionality but it returns only a blank value. I thought it could problem with the form and tried it a new form and even that does not help either.
 
I tried changing the data sources as well, Form.Last submit is not working, However, already defined Form.Last submit still works. Only the newly defined Form.Last Submit returns blank values. What could be the reason for it?
 
Help me to solve this issue. 
 
Inspection_Overview_form.LastSubmit returns data 
 
 
However, Inspection Form_2. LastSubmit is not returning any data
 
To identify if the problem is related to the form itself or within the app, I tried the following steps 
 
1. I created a new Inspection Form 2 with the same data source and tried the Form.LastSubmit it does not work .
2. I created a new Inspection Overview Form and tried Form.LastSubmit, even there it is not working but as you can see in the screenshot the previously defined Inspection_Overview_form.LastSubmit still works!
3. I tried creating a new app and inserted a new Form and connected to the data source and checked the Form.LastSubmit, the issue still remains the same.  
 
Help me to solve this issue  
 
 
 
 
Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
     
     
    can u please copy paste your code here so we do not need to retype?
     
     
     
    thanks in advance
  • CU25110749-0 Profile Picture
    51 on at
    This is the code that I have used on the Text property of a label 
     
    "Total Parts Inspected: " & LookUp(
        'Firewall Inspection Overview',
        ID = Inspection_Overview_form_1.LastSubmit.ID
    ).'Total Inspected Parts ' & " ;    " & " Total OK Parts : " & (LookUp(
        'Firewall Inspection Overview',
        ID = Inspection_Overview_form_1.LastSubmit.ID
    ).'Total OK parts ') & " ;  " & " Total NOK Parts : " & (LookUp(
        'Firewall Inspection Overview',
        ID = Inspection_Overview_form_1.LastSubmit.ID
    ).'Total NOK parts ') &";   Last Submit ID : " &'Inspection Form_2'.LastSubmit.ID
  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at
    Hi CU25110749-0
     
    Can you confirm that you're calling SubmitForm against your Inspection_Overview_form? If you Patch the items on the form or Patch Inspection_Overview_form.Updates, those operations would not set the LastSubmit value.
  • CU25110749-0 Profile Picture
    51 on at
     Yes, I am calling SubmitForm against both my forms Inspection_Overview_form_1 as well as Inspection Form_2. I am not using any Patch function to submit the results to the Sharepoint list. 
  • LessCodePaths Profile Picture
    100 on at

    Form.LastSubmit returns values only until you reset the form.
    It is useful when you need to update a variable based on the last item you submitted.

    Once you have captured the item in a variable, refer to the variable instead of Form.LastSubmit.

    L.

  • CU25110749-0 Profile Picture
    51 on at
    But I have not used any ResetForm function. Even I tried creating a new form connected to SharePoint datasource in a new blank app, even there Form.LastSumit is returning only a blank value. 
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at
    Only coming in here to offer more compact code - although if you have submitted both forms, your original code should work
    "Total Parts Inspected: " & Inspection_Overview_form_1.LastSubmit.'Total Inspected Parts ' & " ;    " & 
    " Total OK Parts : " & Inspection_Overview_form_1.LastSubmit.'Total OK parts ' & " ;  " & 
    " Total NOK Parts : " & Inspection_Overview_form_1.LastSubmit.'Total NOK parts ' & 
    "; Last Submit ID : " & 'Inspection Form_2'.LastSubmit.ID
     
  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at
    Hi CU25110749-0
     
    This might seem like an obvious question, but is Inspection Form_2 successfully adding/updating the record?
     
    If the save operation fails, that would be a reason why the LastSubmit is blank. It might be worth Notifying the error in the OnFailure property of the app to highlight a failure. 
     
    Notify("Save failed", NotificationType.Error)
     
  • CU25110749-0 Profile Picture
    51 on at
    I tried with a new form in a new canvas app, even there the LastSubmit Function is not working.  
     
    I used a label to get the LastSubmit data.  I had  Form1.LastSubmit.'Inspection date' in the Text property of the label.
     
    Form 1 is connected to the SharePoint list Firewall Inspection 

     
    I used save button to save the form and it has the following code in OnSelect Property : 
    SubmitForm(Form1); NewForm(Form1)
     
    Upon submitting the form, the results are getting stored in the SharePoint List and that indicates the form is getting submitted but the Form.LastSubmit says no data. 
     
  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at
    Hi CU25110749-0
     
    With the new form that you're using, what if you try another field such as Count? Does that return the value that you entered (ie, 1)?
     
    Form1.LastSubmit.Count 
     
    Also, can you confirm that you actually entered an Inspection Date into the date picker? 
     
    The screenshot that you posted shows what appears to be the placeholder date (December 31, 2001) rather than a date that's actually been selected or entered through the control. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard