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

If statement in an auto generated email in PowerApps

Good morning!

 

I have Email Templates setup in HTML for all of my auto generated emails that are sent out.  I now need to add an IF statement so that notes will only be added if they are not blank and I'm not sure how to properly format the HTML in PowerApps.

 

So I only want this string to be visible if varEmailNotes is not not blank. (varEmailNotes is a global variable).

 

<p><strong>Notes from Resolving Officer: </strong>" & varEmailNotes & "</P>

 

Thank you!

 

-g

 

1 ACCEPTED SOLUTION

Accepted Solutions

"If(!IsBlank(varEmailNotes),"<p><strong>Notes from Resolving Officer: </strong>" & varEmailNotes & "</P>","")

 

Like that?

Please be carefull with the () and the ""

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

My website!

View solution in original post

4 REPLIES 4
Nogueira1306
Super User
Super User

<p><strong>Notes from Resolving Officer: </strong>" & If(IsBlank(varEmailNotes),"",varEmailNotes) & "</P>

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

My website!

Nogueira1306,
Sorry I think I explained this wrong and that is because I'm a newbie. I wanted the text "Notes from Resolving Officer:" and the varIiable data "varEmailNotes" to only appear if something is types into that variable text field.
So it would only show this
Notes from Resolving Officer: This is a test.
In the email if there were notes added to the varEmailNotes.
-G
 
 

"If(!IsBlank(varEmailNotes),"<p><strong>Notes from Resolving Officer: </strong>" & varEmailNotes & "</P>","")

 

Like that?

Please be carefull with the () and the ""

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,

Gonçalo Nogueira

Check my LinkedIn!

My website!

Worked, awesome thank you my friend!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,655)