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 / SendEmailV2 sends via ...
Power Apps
Answered

SendEmailV2 sends via email different records than the ones submitted

(0) ShareShare
ReportReport
Posted on by 10

Hello, I have an issue with my Power App and I hope someone would be able to advise.. I have a Sharepoint list connected to the App and it is basically adding/adjusting records in the FTE database, all working correctly. I need to add a functionality that would send an email with the record added/adjusted on the submit. I tried to add in the OnSuccess property of the form the following:

 

 

Office365Outlook.SendEmailV2("my@email.com","Notification - Change in Training",
"Name: "& EmpName1.Text&
"<br> Username: "&Username1.Text&
"<br> Training Assigned: <br>"&Concat(TrainingAssigned1.SelectedItems, Value & " <br>"))

 

 

And I indeed receive an email notification on submit, but everytime with values from a different record (last accessed or first from the list), not the one submitted! I checked the Sharepoint list and everything is fine there, just the email contains random data.. any idea how to fix this please?

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @sona_b ,

    You need to either send the mail before you submit the form or refer to the field values you have just submitted as below

    Office365Outlook.SendEmailV2(
     "my@email.com","Notification - Change in Training",
     "Name: "& Self.LastSubmit.EmpNameField &
     "<br> Username: " & Self.LastSubmitUserNameField & 
     "<br> Training Assigned: <br>" & Concat(Self.LastSubmit.TrainingAssignedField, Value," <br>" 
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • sona_b Profile Picture
    10 on at

    You are right, thank you so much!!! 🙂

  • sona_b Profile Picture
    10 on at

    Can I ask in addition please - at first I thought just adding the SendEmailV2 before the Submit command as you suggested, I just realized that sometimes user can click on the Submit button with incomplete form which will not be submitted, but the incomplete email will be sent out.. so I wanted to use your code with Self.LastSubmit references, but it does not work for me on the comboboxes, it underlines the TrainingAssignedField, is the syntax correct please?

    "<br> Training Assigned: <br>" & Concat(Self.LastSubmit.TrainingAssignedField, Value," <br>")

     

  • Verified answer
    WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @sona_b ,

    Just add the submit after the mail. You will have to use Form.Valid before this if you want to check the form is complete.

  • sona_b Profile Picture
    10 on at

    Thanks a lot, it worked with Form.Valid 🙂 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard