web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Chebox values in HTML ...
Power Apps
Answered

Chebox values in HTML text with newline in email body in power apps

(1) ShareShare
ReportReport
Posted on by 42

I have 4 chebox controls in my apps

 

checkbox1

checkbox2

checkbox3

checkbox4

 

Based on the selection of the controls in above it may be 1 &3 or it may be 2&4 i need to send an email to  users what he selected

its in an HTML text format

Button Onselect control :

Set(checkBox1,If(checkBox1.Value,checkBox1.Text,""));
Set(checkBox2,If(checkBox2.Value,checkBox3.Text,""));
Set(checkBox3,If(checkBox3.Value,checkBox3.Text,""));
Set(checkBox4,If(checkBox4.Value,checkBox4.Text,""));
Set(chkBoxValues,Concatenate(checkBox1,checkBox2,checkBox3,checkBox4));
Set(_htmlTable,Concatenate("<table>


<tr style='height: 30px;'> </tr>
<tr>
<td colspan='2'>
<span style='font-family:Kristen ITC;color:steelblue;font-size:12pt; font-style: italic;
Font-weight: bold;'> Demonstrated: </span>
<span style='font-family:Comic Sans MS;color:#776665;font-size:10pt;'> ",chkBoxValues," </span>
</td>
</tr>

<tr style='height: 30px;'> </tr>

<tr>
<td colspan='2'>
<span style='font-family:Comic Sans MS;color:#776665;font-size:10pt;'>
'> ",TextEmailMessage1.Text,"
</span>
</td>
</tr>
</table>"));
Office365Outlook.SendEmail(_email, "Hi", _htmlTable, {IsHtml:true,Importance:"Normal"});

Categories:
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    The problem here is that you set your global variables to have the same name as the controls, so then when you reference checkBox4 in your concat, it's looking at the control not the variable.

     

    Prefix the variables with either gbl_ or var_ or ctx_ to show what kind of variable they are, this will also help define them apart from the actual controls.

     

    Cheers,

    Sancho

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard