cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Selected Value send email with if statement

Hello everyone,

I've got a Dropdown box and would like to send a seperate email based on a selected item. I know i have to use the If statement but how?

Office365Outlook.SendEmailV2("name@domain.com","Title","<h1>Hardware Request</h1>"&"<b>Requester:  </b>"&SelectedName.DisplayName&"<b>Hardware:  </b>"&DropdownH.Selected.Value&",{Cc:SelectedName.Mail&";});Reset(DropdownH);Navigate(Home)

So when i select a hardware mouse or keyboard a mail goes to the servicedesk, but when i select a laptop or monitor the mail must go to a manager 😉

 

Thank you in advance for any help!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Jeff Thorpe,

 

Thanks for your reply, It works😊

 

Kind regards.

View solution in original post

2 REPLIES 2
Super User
Super User

You could set a variable before the Office365Outlook.SendEmailV2 with the correct SendTo email address and then use that in the Office365Outlook.SendEmailV2 call.

 

Here is an example. You would need to change the ServiceDesk.Mail and Manager.Mail to the correct values.

 

Set(varSendTo, If(DropdownH.Selected.Value = "mouse" Or DropdownH.Selected.Value = "keyboard", ServiceDesk.Mail, Manager.Mail);
Office365Outlook.SendEmailV2(varSendTo,"Title","<h1>Hardware Request</h1>"&"<b>Requester:  </b>"&SelectedName.DisplayName&"<b>Hardware:  </b>"&DropdownH.Selected.Value&",{Cc:SelectedName.Mail&";});Reset(DropdownH);Navigate(Home)

 

 

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Hi Jeff Thorpe,

 

Thanks for your reply, It works😊

 

Kind regards.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (41,600)