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 / When sending email in ...
Power Apps
Answered

When sending email in power app, I'm unable to capture the text values from the app in email

(0) ShareShare
ReportReport
Posted on by 46

I have a power app that connects to a SharePoint list and Outlook. I've created the app as a blank canvas app. I'm able to save the values from the app back into the SharePoint list. Now, I would like to send an email with those values included. The app sends an email as expected, however, the value from txtPhone.Text is not captured in the email. What am I doing wrong? Below is the code.

 

SubmitForm(Form); Office365Outlook.SendEmailV2( "my email address", "my Subject", "Test: "&txtPhone.Text ); Navigate( ThankYouScreen, ScreenTransition.Fade )

Categories:
I have the same question (0)
  • Verified answer
    Fredrik_A Profile Picture
    3,403 Super User 2026 Season 1 on at

    The txtPhone.text value will be reset after the "SubmitForm", try sending the email first, and then submitting 😃 

  • Fredrik_A Profile Picture
    3,403 Super User 2026 Season 1 on at

    Or you can save the last submit in the OnSuccess of your form, such as:

    Set(varLastItemSubmitted, Self.LastSubmit)

  • itchel123 Profile Picture
    46 on at

    Hi @StretchFredrik ,

    I'm new to Power Apps so I'm still learning how to navigate the app.  Where is the OnSuccess in my form?  Do I need to create the variable first before setting it?  If so, where?  Is Self.LastSubmit the name of the submit button?

  • Fredrik_A Profile Picture
    3,403 Super User 2026 Season 1 on at

    StretchFredrik_1-1715618866215.png

     

    You don't need to create the variable, just put it such as the image 😃

    You can then get the phonenumber using varLastItemSubmitted.ColumnName

     

  • itchel123 Profile Picture
    46 on at

    Thank you.

     

    I have multiple columns that will need to be included in the email.  Would this solution work for multiple fields?

  • Fredrik_A Profile Picture
    3,403 Super User 2026 Season 1 on at

    Yes, just use varLastItemSubmitted.ColumnName for each of the fields needed 😃

  • itchel123 Profile Picture
    46 on at

    When you say, "You can then get the phonenumber using varLastItemSubmitted.ColumnName, does this mean that the code will be like below?

     

    SubmitForm(Form); Office365Outlook.SendEmailV2( "my email address", "my Subject", "Test: "&varLastItemSubmitted.ColumnName); Navigate( ThankYouScreen, ScreenTransition.Fade )

  • Fredrik_A Profile Picture
    3,403 Super User 2026 Season 1 on at

    You need to replace .ColumnName with your actual name in your datasource that holds the PhoneNumber for example.

    So you could write for example varLastItemSubmitted.Title to get the title of the item.

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard