I have a submit screen with list of fields like User, Manager of the user and Title. Here the
*User is a current user so it automatically displays the User Name(Name_TextInput2.Text) by Hard coded -
Office365Users.MyProfile().DisplayName.
*And to get the Manager of the entered user by default(emp_Text22) by Hard coded-
If(!IsBlank(Name_TextInput2.Text), Office365Users.Manager(First(Office365Users.SearchUser({searchTerm: Name_TextInput2.Text})).Mail).DisplayName). This works fine.
Needed is: i need two different emails to send for two different screens.
1)Now if i click the submit its wants to send the email to both the user and the manager depends on the name in the Manager text box field(emp_Text22) and with the html content of the submitted values.
2)For another screen i have a Data Table to store the submitted records. So all the users entries records are stored in DataTable1_1. if i select any one of the record in table then click submit ,the mail wants to send to the name of the employee as well as to the employee manager. I hardcore like this its shows error and didn't receive the mail too.
Clear Collect(Recipients,Office365Users.Manager(User().Email).Mail);
Office365Outlook.SendEmail(Concat(Recipients,Value&";"),"Emp Request","<table>"&DataTable1_1.Selected.'Name of employee'&",<tr><tr><tr>Your Request for " &DataTable1_1.Selected.Destination& " on " &DataTable1_1.Selected.'Departure date'& " was " &AppRej_Radio_1.Selected.Value&" by " &User().FullName&" <td><tr><tr>comments: </td></tr></tr>"&Comments_TextInput1_1.Text&"</table>",{Cc:"",Importance:"High"});
please help. Thanks in advance