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 / Email syntax help on Body
Power Apps
Answered

Email syntax help on Body

(0) ShareShare
ReportReport
Posted on by 139

OnSuccess of a form submission I am attempting to send an email with a few of the values from datacards

 

 

Office365Outlook.SendEmailV2("xxxxx@xxxx.org","New Client Arrival",Form1.LastSubmit.ClientID) <-- works sends the clientid in the body
 
But I want to add more information: 
Office365Outlook.SendEmailV2("xxxxx@xxxxx.org","New Client Arrival",Form1.LastSubmit.ClientID;Form1.LastSubmit.Program.Value;"Client has Medication:"Form1.LastSubmit.ClientOnMeds.Value; "Client Probation Status:"Form1.LastSubmit.Probation/Parole.Value) < this returns just the probation value.
 
The return should look like ClientId  Program  Client has Medications: Answer Client Probation Status: Answer
 
What am I missing
Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @thomasw1964,

     

    You will have to concatenate the text (not use a semicolon). Concatenating strings and dynamic values can be done in multiple ways:

    //Using the & operator:
    "Hello " & User().FullName
    
    //Concatenate function
    Concatenate("Hello ", User().FullName)
    
    //String interpolation
    $"Hello {User().FullName}"

     

    Since we have quite some dynamic values, I prefer to use string interpolation to improve readability:

    Office365Outlook.SendEmailV2(
     "xxxxx@xxxxx.org",
     "New Client Arrival",
     $"{Form1.LastSubmit.ClientID} {Form1.LastSubmit.Program.Value} Client has Medication: {Form1.LastSubmit.ClientOnMeds.Value} Client Probation Status: {Form1.LastSubmit.Probation/Parole.Value}"
    )

     

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

  • klivingstone Profile Picture
    4 on at

    Hi @thomasw1964,

     

    you could use HTML code for the email format.

     

    Office365Outlook.SendEmailV2(
     User().Email, "th style='font: 15px'><b>Text1: </b>" & variable1 & "<br>"
    & "th style='font: 15px'><b>Text2: </b>" & variable2 & "<br>",
    {
     Importance: "Normal",
     ReplyTo: "noreply@microsoft.com"
     }
    )

     

     

    Please let me know if this helps.

  • thomasw1964 Profile Picture
    139 on at

    That works Thank you, How can I line separate the inputs?

     

    Instead of: Akidis Anthony M 45342 Date of Birth:7/23/1976 LT Client Has Medications: Probation Status:Regular

     

    Get:

    Akidis Anthony M 45342

    Date of Birth:7/23/1976

    LT

    Client Has Medications:No

    Probation Status:Regular

     

  • thomasw1964 Profile Picture
    139 on at

    NVM I got it <br>

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