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 / LastSubmit not working...
Power Apps
Unanswered

LastSubmit not working correctly in html post form success

(0) ShareShare
ReportReport
Posted on by 10

I have a form that when successfully executed does the following:

 

Office365.SendEmail(PurchasingEmail, "New Supply Order Request, Order#: "&SupplyRequestView_Form.LastSubmit.ID&" has been approved.", SupplyRequestApproved_HTML.HtmlText, {Importance:Normal, IsHtml:true, Cc:MFGLeadsEmail&","&MFGManagersEmail})

 

The ID returns correctly in the subject field of the email.

 

As seen above, the body is HTML. Here's an applicable snippet:

 

<tr>
<td width=49%>" & " Order Number " & "</td>
<td width=1%>:</td>
<td width=50%>" & SupplyRequestView_Form.LastSubmit.ID & "</td>
</tr>

 

The SupplyRequestView_Form.LastSubmit.ID works in the subject, but NOT in the HTML email. It and all other fields in the HTML when calling against the .LastSubmit method return blank.

 

What am I missing here? This is extremely frustrating. I have certain forms where the post-success .LastSubmit call works perfectly fine in HTML emails and others, such as in this example, where I get nothing but blanks. I can't find a causal relationship. Any help or insight would be extrememly appreciated!

 

Thanks,

 

Stephen

Categories:
I have the same question (0)
  • holtzclaw42 Profile Picture
    10 on at

    As a further update, I've discovered the following:

     

    This works perfectly when tested through the edit application (via development mode). All .LastSubmit values are gathered and populated correctly in the email.

     

    However, when tested as a deployed app (outside of development mode) the .LastSubmit values are not populated in the email.

     

    Another observation is that when the form is in new mode, the emails with the .LastSubmit method appear to work perfectly when SubmitForm is invoked.

     

    However, when a form is in edit mode, the emails with the .LastSubmit method appear to not work and return blank values consistently when SubmitForm is invoked.

     

    That seems like more than a coinsedence. Any thoughts? 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I also have the same problem.

     

    Any suggestion ?

  • sgrpdl Profile Picture
    109 on at

    Any body got the solution.. I too have same issues. Any one found the solution for this??

     

     


    @holtzclaw42 wrote:

    As a further update, I've discovered the following:

     

    This works perfectly when tested through the edit application (via development mode). All .LastSubmit values are gathered and populated correctly in the email.

     

    However, when tested as a deployed app (outside of development mode) the .LastSubmit values are not populated in the email.

     

    Another observation is that when the form is in new mode, the emails with the .LastSubmit method appear to work perfectly when SubmitForm is invoked.

     

    However, when a form is in edit mode, the emails with the .LastSubmit method appear to not work and return blank values consistently when SubmitForm is invoked.

     

    That seems like more than a coinsedence. Any thoughts? 





  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Bumping for visibility 

     

    @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for checking in..

    Just I posted in my previous post. Everything works fine except for the last part...

     

    I am sending a notification email directly from PowerApp (without using a flow), everything works fine except From email is the showing as requester email id, is there a way we can change from email to any specific Shared mailbox which my group uses.

    I have done this in the flow where we define from to our shared mailbox but I don't know how to do this from PowerApps.

  • sgrpdl Profile Picture
    109 on at

    What i did for my html case, and this worked for me..

     

    <p>ID: "&  Last('Sharepointlistnamehere').ID+1    &" </p>

     

    ---

     

    Last('Sharepointlistnamehere').ID+1 

  • sgrpdl Profile Picture
    109 on at

    on Success of your form

    ON Success: Set(VarLSID,FormTAF.LastSubmit.ID)

    you can use that Global var any where then..

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard