cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lana
Helper II
Helper II

Hide text in send email body

Hello Everyone,

 

Just wondering how you can hide some text in the html code I have in the email body? 

 

I have an html code to display contact information of the user who submitted the form. Sometimes the user who is submitting the form doesn't have a mobile number. So I don't want to display the text "Mobile:" in the contact information.

 

<div style='display:inline;visibility:hidden;'> Mobile: @{variables('Mobile')}</div>

 

I tried setting the visibility property using a variable which gives the correct output in the flow. However in the email I still see the word "Mobile:"

 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
mahoneypat
Super User
Super User

You could use an approach like this.  Create a compose like below and then use that in your email.  It checks the length of the Mobile variable and returns Mobile and the number if >1 or empty '' if not.

 

mahoneypat_0-1637634745118.png

 

if(greater(length(variables('Mobile')),1), concat( 'Mobile: ', variables('Mobile')), '')
 
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

1 REPLY 1
mahoneypat
Super User
Super User

You could use an approach like this.  Create a compose like below and then use that in your email.  It checks the length of the Mobile variable and returns Mobile and the number if >1 or empty '' if not.

 

mahoneypat_0-1637634745118.png

 

if(greater(length(variables('Mobile')),1), concat( 'Mobile: ', variables('Mobile')), '')
 
Pat




Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,487)