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 email with field ...
Power Apps
Answered

send email with field values

(0) ShareShare
ReportReport
Posted on by

Hello, 

 

Wanted to see if anyone had any ideas on how to create a submit button, that would send an email from Power Apps that also included the values from drop downs, input fields in a form, to a specific email address I specify?  I know that I can use a SharePoint site to send the values and then use Power Automate to do it after the fact, but I want it to just send the values, to Joe.Smith@Email.com & Joe.Smith2@Email.com with the values in the body of the email.  

 

Has anyone done something like that?  Example of the fields from my form below.  

 

ianallen13V2_0-1671485722620.png

 

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @ianallen13V2, you can use the 'FormName.LastSubmit' property to get the most recently created values.

    The submit button could have the following structure in the OnSelect property:

     

    //Submit your form
    SubmitForm(FormName);
    
    //Fetch the record info
    UpdateContext({varLastSubmit: FormName.LastSubmit});
    
    //Send out email
    Office365Outlook.SendEmailV2("Joe.Smith@Email.com; Joe.Smith2@Email.com", "Subject", "Field 1 " & varLastSubmit.ID & "Field 2...")

    You will need to add the Office 365 Outlook connector to your app data sources to use the SendEmailV2.

     

    If this solves your question, would you be so kind as to accept it as a solution.
    Thanks!

  • ianallen13 Profile Picture
    282 on at

    Thank you so much for the reply - unfortunately this answer may be a bit above me, but when I try to incorporate it, I have errors all over.  

     

    ianallen13_0-1671558144765.png

     

    Might need a bit more clarification.  Thank you in advance!

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @ianallen13, what specific error messages are you receiving and is 'Fin Aid Systems' the name of your Form?

    Normally you should not receive any errors with SubmitForm & .LastSubmit if you are referencing a Form control.

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    It looks like there is an issue with the form name.  Is 'Fin Aid Systems' the name of the form or of your data source? 

  • ianallen13 Profile Picture
    282 on at

    Hi - yes - 'fin aid systems' is the name of the form I'm using.

  • ianallen13 Profile Picture
    282 on at

    Hi yes - Fin Aid Systems is the name of the form. 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @ianallen13 when you hover over the red line, what specific error do you receive?

  • ianallen13V2 Profile Picture
    on at

    The first error states: "The function states an editable form as its input"

     

    The second error states: "Incompatible view.  We can't evaluate your formula because the context variable types are incompatible with the types of values in other places in your app."

     

    The third error states: "Name isn't valid. 'varLastSubmit' isn't recognized"

  • LaurensM Profile Picture
    12,516 Moderator on at

    @ianallen13V2 are you using an Edit form or a Display form?

    You will need an Edit Form to use SubmitForm().

    LaurensM_0-1671574029384.png

     

    Would it be possible to share a screenshot of this form control in your Tree View panel (left).

  • ianallen13 Profile Picture
    282 on at

    Thanks for the screen shot.  I was not using this.  I just looked into this now, but it says that I need to connect to data.  I didn't want to connect to anything as far as a Sharepoint list or anything, is that even still an option?  

     

    Sounds like I can't just have fields and have an email send the values of those fields without doing like a SharePoint list or something?

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard