
Announcements
Hello, hopefully someone can help this PowerApps noob with what is probably a basic question.
I have two buttons which send different emails. The body of each email is drawn from a hidden label on the canvas.
Button one is b_ScriptSave2, has the following code and works as expected:
SubmitForm(form_script);
Office365Outlook.SendEmail("****@****.com", "*Automated Email* Please review a script change", EditEmailText.Text);
Set(viewsavescript, false);
Set(var_Edit, false);
Set(var_EditBlocker, false)
Button two is b_SubmitRequest and has the following code:
Office365Outlook.SendEmail("****@****.com", "*Automated Email* A script change has been requested", RequestEmailText.Text);
Set(var_viewrequest, false);
Set(var_EditBlocker, false);
Reset(ti_ChangeRequest)
and RequestEmailText has the following code:
Office365Users.MyProfile().GivenName & " " & Office365Users.MyProfile().Surname & " has requested a change to a script.
Request Notes:
" & ti_ChangeRequest.Text & "
Please review this request and make any necessary changes in the app."
b_SubmitRequest does something strange...if Text Input ti_ChangeRequest is left blank the email will send as expected. However, if there is text in ti_ChangeRequest, two emails are sent. The first email is as expected, but the second email has the subject from b_SubmitRequest but the body from b_ScriptSave2.
I can't for the life of me figure out why. Can anyone help please?
Thanks
Hi @Anonymous ,
A bit strange, but also try this in RequestEmailText
User().FullName & " has requested a change to a script.
Request Notes:
" & ti_ChangeRequest.Text & "
Please review this request and make any necessary changes in the app."
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.