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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Send Email - Dynamic S...
Power Apps
Answered

Send Email - Dynamic Subject

(0) ShareShare
ReportReport
Posted on by 446

I have a form with a text input field that I would like to use as the subject line when sending an email. I feel like I have the correct answer but it doesn't appear to be working. Here is my sample code:

 

 

Office365Outlook.SendEmailV2(
 "myemail@email.com",
 "Downtime - " & DowntimeType.Text,
 varEmailMessage,
 {Importance: "High"}
);
ResetForm('Downtime Form');

 

 

No errors are being thrown but it doesn't add the input from DowntimeType.Text. The email I receive has the subject line as "Downtime - " and nothing else. I've also tried using Concatenate to no avail. I don't work with forms often so maybe it has something to do with the fact that the input is within a DataCard?

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ryan_B 

    First, this formula should be in the OnSuccess action of your form. 

    From there, you need to access the LastSubmit value from your form.

    Office365Outlook.SendEmailV2(
     "myemail@email.com",
     "Downtime - " & Self.LastSubmit.DowntimeType, // or whatever your field name is from the form record.
     varEmailMessage,
     {Importance: "High"}
    );
    ResetForm('Downtime Form');

     

    I hope this is helpful for you.

  • Ryan_B Profile Picture
    446 on at

    @RandyHayes 

    So I ended up changing it from a text input to a combo box, how would that alter that line? I've tried the two lines below as they are the only ones that will accept anything, but neither work.

     

    "Downtime - " & Self.LastSubmit.'Downtime Type'.Value
    "Downtime - " & Self.LastSubmit.DowntimeType.Value

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ryan_B 

    What is the name of the column in your list record for Down Time Type and what kind of column is it?

  • Ryan_B Profile Picture
    446 on at

    @RandyHayes 

    The column name is "Downtime Type" and it's a Choice column.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ryan_B 

    Then this: 

    "Downtime - " & Self.LastSubmit.'Downtime Type'.Value

    Should be working for you.

     

    Do you get an error or anything on it?

  • Ryan_B Profile Picture
    446 on at

    @RandyHayes 

    No error is thrown, but it still doesn't come through correctly. I'm also noticing that it's not actually saving the value to the SharePoint list either. I wonder if that's indicative of what the actual problem is.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ryan_B 

    Yep!  There's the issue.  

    What is the Update property of the datacard that contains that control?

  • Ryan_B Profile Picture
    446 on at

    @RandyHayes 

    DowntimeType.Selected.Value
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Ryan_B 

    To clarify - 

    DowntimeType is the name of the dropdown control in your form datacard?

    The value you are trying to submit from the dropdown is in your choice column?

    The items property of the Dropdown control is: Choices(yourList.'Downtime Type')?

     

    Tell me about any customizations you have made to the "Downtime Type" datacard when/after you added it to your form.

  • Ryan_B Profile Picture
    446 on at

    @RandyHayes 

    Sorry for the confusion.

     

    DowntimeType - name of the combo box within Downtime Type_DataCard2

    Values within this combo box are appearing properly from the SharePoint list where the column is called "Downtime Type" and of type Choice.

    Items property - Choices([@'MyList'].DowntimeType)

     

    As for changes I made, it's tough to say exactly. I went into my SharePoint list and changed the column from single line of text to Choice, and added some sample choices. Went back to my Power App and refreshed my data source. Removed the text input field from the data card and added a combo box instead. Went through the error marks and thought I wired it back up correctly but it appears that isn't the case.

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#2
Haque Profile Picture

Haque 69

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard