web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Send am Mail with all ...
Power Apps
Suggested Answer

Send am Mail with all Form Values from a new form and save to sharepoint

(1) ShareShare
ReportReport
Posted on by 92
Hi all,
 
I have an power app with a form deault mode is "NEW". I now want to fill out the form, press button submit and then send the values entered in the "NEW" form to a specific email address and also want to save all the values to their corresponding fileds in my sharepoint lsit.
 
Sounds easy and fair so long, right?
 
I tried to put 
//send Mail
Office365Outlook.SendEmailV2(
    "my.mail@domain.com",
    "Subject",
    "Field 1: " & varLastSubmitForm.Title
    );
 
on the onSelect function of the "submit" button. I also tried to put this on the "onsucess" function of the form itself.
 
I have on both places the problem that I cannot reference to the sharePoint field names Like "varLastSubmitForm.Title" or "varLastSubmitForm.Customer" or "varLastSubmitForm.Comments"
 
PowerApps formular checker always says "name is not valid, 'customer' is not recognized"
 
What can I do to get powerapps recognize my filed names from sharepoint list as variables / values in my powerapp and I am able to send that waht user fills out in my form gets in the sharepoint list and is also sent by mail to a specific mail address.
 
Cheers and thanks
 
Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at
    Hey,

    The below worked for me:
    1. OnSelect property of Submit button:  SubmitForm(FormName)
    2. OnSuccess property of Form: 
    Office365Outlook.SendEmailV2("EmailID","Subject goes here","Body"&FormName.LastSubmit.Title&"Hello again");ResetForm(FormName)
     
     
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    HI,
     
    To be honest I am not following. The name varLastSubmitForm.Title is never going to be a SharePoint field name, I don't even know what theat is.
     
    When you do your submit, are you setting the LastSubmit record value to a variable called VarLastSubmitForm? Why? it's not necessary to access the values
    no need to store them in that variable
     
    Also, as you didnt share any Code with us, where you are setting that variable, my assumption is you have not set it correctly. Please replace that variable with just the ForName.LastSubmit.'ColumnName' and skip that variable thing
  • Andre-Radtke Profile Picture
    92 on at
    Sorry @flmike I thought my code snippet was enough.
     
    I got my Info and the way I tried from this Post: Solved: send email with field values (powerplatform.com)
     
    I will give @nandini`s and your suggestion a try and will reply later on if it helped! PS: with more detailed Info about what I did (promised).
     
    Thank you both for your help!
    Cheers Andre
  • Andre-Radtke Profile Picture
    92 on at
    Hey Guys,
     
    you tip was right, I don´t need variables as mentioned in that post.
     
    Thank you so much!
     
    Cheers Andre
  • Andre-Radtke Profile Picture
    92 on at
    My code is as follows (I cannot add code in a codeblock, I am getting an error):
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi 
     
    What error are you getting, you didn't say. Now be honest... do you think I can see your screen and read the error over your shoulder???
     
    Pssssttt.. I cannot :-) why tell me you got an error and not share it.
     
    Also, you need to make sure that you add the using HTML tag and turn it on or else you will not get the html in your Email format
     
    here are good examples, as my blogs are down
  • Andre-Radtke Profile Picture
    92 on at
    I like to @mention you - but not possible in this new forum.....
    I like to mark as Solution / Answer -  but not possible in this new forum.....
     
    a big step backward..... thanks Microsoft!
  • Andre-Radtke Profile Picture
    92 on at
    @FLMike: Everything is fine now. Error was in screenshot (underlined text) problems with formular or sth.
     
    My Problem got solved by you guys, thanks! I liked to mark as solution, but not possible anymore because of the new platform!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard