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 )
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.
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 )
Yes, just use varLastItemSubmitted.ColumnName for each of the fields needed ๐
Thank you.
I have multiple columns that will need to be included in the email. Would this solution work for multiple fields?
You don't need to create the variable, just put it such as the image ๐
You can then get the phonenumber using varLastItemSubmitted.ColumnName
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?
Or you can save the last submit in the OnSuccess of your form, such as:
Set(varLastItemSubmitted, Self.LastSubmit)
The txtPhone.text value will be reset after the "SubmitForm", try sending the email first, and then submitting ๐
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2