I am trying to pass a date from the date picker which is stored in a variable "value_ProofDate". When you click on ".Selected Date", the date that you pick shows up as you can see from the picture below. I use this same variable in an HTML text field which you can see below the first picture. Does the email function need some extra code to make it work? I'm stumped why the variable shows in the HTML text but not the email subject line.
Office365Outlook.SendEmailV2(
Concat(
Combo_CSRs.SelectedItems.mail,
mail & ";"
) & Concat(
Combo_Artists.SelectedItems.mail,
mail & ";"
), // "extra email here",
"TPS Submission- " & Customer_frm.LastSubmit.ID & "- Proof by Date: " & value_ProofDate.SelectedDate,
"<h1>Form Submission</h1>" & Html_custInfo.HtmlText & "<br><br>" & Html_itemInfo.HtmlText,
{
Attachments: AddColumns(RenameColumns(value_attachments.Attachments, "Value", "ContentBytes"),"@odata.types",""),
Importance: "Normal",
IsHtml: true,
Cc:User().Email
})
if you are string selected date from date picker into variable then no need to use SelectedDate inside.
just use variable name.
value_ProofDate
I tried that and it does not work either.
is & missing ?
& value_ProofDate.SelectedDate,&
"<h1>Form Submission</h1>" &
Hi @Renegade34G
You could try converting the date by calling the Text function and optionally providing a format. This would rule out the concatenation of a string and a date object as the cause of the problem.
Text(value_ProofDate.SelectedDate,DateTimeFormat.ShortDateTime)
The TPS Submission is the start of the subject line and at the end by selectedDate is a comma, signaling the end of the subject line. If I add an &, it errors out with "unexpected char...."
I made the change and it still did not work. The email still comes across with the subject line but not the variable for the date. In fact, all date fields do not come across. I'm curious if any one can make a simple app and include a date picker and pass that variable to the O365 V2 email and try emailing it.
Office365Outlook.SendEmailV2(
Concat(
Combo_CSRs.SelectedItems.mail,
mail & ";"
) & Concat(
Combo_Artists.SelectedItems.mail,
mail & ";"
), // "extra email here",
"TPS Submission- " & Customer_frm.LastSubmit.ID & "- Proof by Date: " & Text(value_ProofDate.SelectedDate,DateTimeFormat.ShortDateTime),
"<h1>Form Submission</h1>" & Html_custInfo.HtmlText & "<br><br>" & Html_itemInfo.HtmlText,
{
Attachments: AddColumns(RenameColumns(value_attachments.Attachments, "Value", "ContentBytes"),"@odata.types",""),
Importance: "Normal",
IsHtml: true,
Cc:User().Email
})
.
This may change but I just made a simple app with a date picker and it works. However, my data field is pulling from a SharePoint list and put into the PowerApps form. It appears there is more guts to a SharePoint date picker.
This is just a plain date picker
This is a date picker from SharePoint
I am still able to grab the data from the "value_ProofDate" in all other places except email. Could this be a bug?
I will not mark this as an answer because it is a workaround. I created a label and pulled the date from the value_ProofDate field. In the subject line, I then pointed to the label field and it works.
User | Count |
---|---|
254 | |
106 | |
96 | |
50 | |
39 |