Skip to main content
Community site session details

Community site session details

Session Id : 9pfqFgwjII7g5Q/yUpPQMa
Power Apps - Building Power Apps
Answered

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

Like (0) ShareShare
ReportReport
Posted on 13 May 2024 16:39:39 by 44

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 )

  • StretchFredrik Profile Picture
    3,085 Super User 2025 Season 2 on 13 May 2024 at 16:57:45
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

    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.

  • itchel123 Profile Picture
    44 on 13 May 2024 at 16:56:30
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

    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 )

  • StretchFredrik Profile Picture
    3,085 Super User 2025 Season 2 on 13 May 2024 at 16:51:57
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

    Yes, just use varLastItemSubmitted.ColumnName for each of the fields needed ๐Ÿ˜ƒ

  • itchel123 Profile Picture
    44 on 13 May 2024 at 16:50:16
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

    Thank you.

     

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

  • StretchFredrik Profile Picture
    3,085 Super User 2025 Season 2 on 13 May 2024 at 16:48:17
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

    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
    44 on 13 May 2024 at 16:45:25
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

    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?

  • StretchFredrik Profile Picture
    3,085 Super User 2025 Season 2 on 13 May 2024 at 16:42:35
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

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

    Set(varLastItemSubmitted, Self.LastSubmit)

  • Verified answer
    StretchFredrik Profile Picture
    3,085 Super User 2025 Season 2 on 13 May 2024 at 16:41:00
    Re: When sending email in power app, I'm unable to capture the text values from the app in email

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

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful forโ€ฆ

Paul Stork โ€“ Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Communityโ€ฆ

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete