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 / Adding User Entered Te...
Power Apps
Unanswered

Adding User Entered Text into Email Subject

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 

I'm sending an email upon a user completing my app using Office365Outlook.SendEmailV2. The email lists everything that the user has filled out during the form and i'm wanting one of the results that they have entered in a Text input box to be put in the Subject of the email. The name I have given to the Text input box is Job Number.

 

Thanks in advance! 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Office365Outlook.SendEmailV2(User().Email, JobNumber.Text, "Form ID" & Form.DataCardValue.Text)

    You can also use Form.LastSubmited.ID, for example

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Dave-ITMan Profile Picture
    on at

    Hi,

    Thanks for the quick reply. I'm not sure what the form ID is referring to? It's the Job number listed that I need to show in the subject of the email. 

    My code is below if that helps?

     

    ClearCollect(CollectAttachments, AttachmentControl.Attachments); ClearCollect(SignatureCollection, {Signatures:Signature.Image});

    Office365Outlook.SendEmailV2("firstname.lastname@companyname.com" , "Subject Here" , "Hi,<br><br>

    Please see completed form below and attached images<br><br>

    <a href=https://companyname.sharepoint.com/sites/PowerApps/Lists/TestForm/AllItems.aspx>Click Here to View the Full SharePoint List</a><br><br>

    <b>Customer: </b>"&Customer.Text&"<br>
    <b>Address: </b>"&Address.Text&"<br>
    <b>Job Number: </b>"&'Job Number'&"<br>
    <b>Date: </b>"&Date.SelectedDate&"<br><br>

     

    Regards<br></br>

    {Attachments: AddColumns( RenameColumns (AttachmentControl.Attachments,"Value", "ContentBytes"), "@odata.type", "")});
    Patch(TestForm, Defaults(TestForm),

    {
    Title: ValueDateTimeNow.Text,
    Customer: Customer.Text,
    'Site Address': Address.Text,
    'Job Number': 'Job Number'.Text,
    Date: Date.SelectedDate

    });
    Navigate(Success,Cover)

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    ClearCollect(CollectAttachments, AttachmentControl.Attachments); ClearCollect(SignatureCollection, {Signatures:Signature.Image});

    Office365Outlook.SendEmailV2("firstname.lastname@companyname.com" , JobNumber.Text , "Hi,<br><br>

    Please see completed form below and attached images<br><br>

    <a href=https://companyname.sharepoint.com/sites/PowerApps/Lists/TestForm/AllItems.aspx>Click Here to View the Full SharePoint List</a><br><br>

    <b>Customer: </b>"&Customer.Text&"<br>
    <b>Address: </b>"&Address.Text&"<br>
    <b>Job Number: </b>"&'Job Number'&"<br>
    <b>Date: </b>"&Date.SelectedDate&"<br><br>

     

    Regards<br></br>

    {Attachments: AddColumns( RenameColumns (AttachmentControl.Attachments,"Value", "ContentBytes"), "@odata.type", "")});
    Patch(TestForm, Defaults(TestForm),

    {
    Title: ValueDateTimeNow.Text,
    Customer: Customer.Text,
    'Site Address': Address.Text,
    'Job Number': 'Job Number'.Text,
    Date: Date.SelectedDate

    });
    Navigate(Success,Cover)

  • Dave-ITMan Profile Picture
    on at

    That's great thank you so much! I don't suppose you know how I can include the attachments that have been sent in the email to also attach into my sharepoint list do you please using the code above? 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard