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

Adding email to an existing formula

Hello,

 

Currently I have started testing and even created an updated version of Service Desk App. However what I would like is that the second someone creates a new ticket it sends all IT staff an email notification of that new ticket.

 

Currently I have the following code on create ticket

 

If(IsBlank(Subject.Text) || IsBlank(Description.Text) ,UpdateContext({msg_visible:true}),SubmitForm(NewTicketForm);UpdateContext({New:Patch(Tickets,LookUp(Tickets,ID=Text(Max(Tickets,ID))),{Subject:Subject.Text,Description:Description.Text})}))

 

Is there a way to add something like the following?

 

Office365.SendEmail(
          DataCardValue12.Selected.Email, // To field
           "Text",                        //  Subject Field
           "<b><font color=blue>HTML</font></b>text"           // Body Field, this could also be HtmlText1.HtmlText     
           {IsHtml:true}                  // the record elements for other parameter          
       )

 

I am a real novice when it comes down to these things.

14 REPLIES 14

Great, I'm glad that did the trick!

GC87
Frequent Visitor

Now i just have to change the rest. I did get the email from the ticket which is great however I get Text as the subject and the body is HTMLtext. I know that I placed subject as Text so that is easy to fix but the body i need to figure out haha I will post any questions if I have a hard time.

GC87
Frequent Visitor

Just changed the Subject but am not understanding the body portion. Sorry if I am bugging haha

GC87
Frequent Visitor

This is the latest I have transformed to

 

If(IsBlank(Subject.Text) || IsBlank(Description.Text) ,UpdateContext({msg_visible:true}),SubmitForm(NewTicketForm);UpdateContext({New:Patch(Tickets,LookUp(Tickets,ID=Text(Max(Tickets,ID))),{Subject:Subject.Text,Description:Description.Text})});
Office365.SendEmail(
"email1@company.com", // To field
"New Ticket", // Subject Field
Value13 & Char(10) & Subject & Char(10) & Description & Char(10)
))

 

For some reason I cannot get Value13 to print on the email whoever

 

DataCard15 is the Created by* section where it asks the user to place their name

DataCard15 is the following:

 

StarVisible15 = "*"

ErrorMessage15 = Parent.Error

Value13 = Parent.Default

Key15 = Parent.DisplayName

 

So Im curious if I need to change Value13 to something completely different or modify it to be visible or if I need to replace Value13 with Key15 instead. This is as far as I have gotten.

 

 

Value13 is a text input control. Therefore, Value13.Text is the syntax that you would use to retrieve the text that's in the control.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,360)