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!
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?
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)
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)
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!
WarrenBelz
146,537
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,908
Most Valuable Professional