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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Two Columns HTML Text ...
Power Apps
Answered

Two Columns HTML Text PowerApps

(0) ShareShare
ReportReport
Posted on by 14

Hi everyone! Is it possible to create two columns HTML text in PowerApps? Below is the exported PDF version of my HTML text. MY HTML text is dynamic. I tried using <div style='column-count: 2'> but doesn't seem to work. Thank you.

 

kess_0-1681089515082.png

 

Here is my current HTML text code:

"<html>
<body>
<p style = 'font-family:courier new'>USD Serial List
<br>Generated By: " & ProfileName &
"<br>Date / Time: " & Now() & 

"<div style = 'column-count: 2'>
<table style = 'font-family:courier new'>
<thead><tr><th>Denomination</th><th>Serial</th></thead>
<tbody style = 'text-align:center;'>" 
& Concat(billCollection, "<tr><td>" & Substitute(NumeralDenomination,"USD ","") & "</td><td>" & SerialNumber & "</td></tr>") &
"</tbody></table><br>

<table style='font-family:courier new;'>
<thead><tr><th>Denomination</th><th>Count</th><th>Total</th></tr></thead>
<tbody style = 'text-align:center;'>" 
& Concat(billDenominationCountUser, "<tr><td>" & Substitute(Title,"USD ","") & "</td><td>" & billCountUser & "</td><td>" & Substitute(Title,"USD ","")*billCountUser & "</td></tr>") &
"</tbody></table>

<h4 style = font-family:courier new;>--------------------------<br>GRAND TOTAL: " & Concatenate("USD ", Sum(billCollection,Substitute(NumeralDenomination,"USD ",""))) &
"</h4> <br>
<p>----------------------------------------------</p>
<p style = font-family:courier new; >Client's Conforme</p>
</div>
</body>
</html>"

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @kess ,

     

    Sorry, but I have to say it's not possible in PowerApps.

     

    Best regards,

  • Verified answer
    SolTeferi Profile Picture
    on at

    Hi @kess ,

     

    With a little bit of HTML tricks, you can achieve the number of wraps you want the table to split into. Please try the following. Currently, it splits the table into two side by side. If you want to split it into, for example, three, just change the '2' in 'CountRows(billCollection)/2' to '3'.

     

     

    With(
     {wraps: CountRows(billCollection) / 2},
     With(
     {
     colCount: RoundUp(
     CountRows(billCollection) / wraps,
     0
     )
     },
     With(
     {
     colSerial: Sequence(
     colCount,
     1,
     1
     )
     },
     "<html>
    <body>
    <p style = 'font-family:courier new'>USD Serial List
    <br>Generated By: " & ProfileName & "<br>Date / Time: " & Now() & Concat(
     ForAll(
     colSerial,
     With(
     {
     counted: LastN(
     FirstN(
     billCollection,
     ThisRecord.Value * wraps
     ),
     wraps
     )
     },
     "<div style='position:relative; float:left'>
    <table style = 'font-family:courier new; page-break-inside:auto'>
    <thead><tr 
     
    ><th>Denomination</th><th>Serial</th></thead>
    
    <tbody style = 'text-align:center;'>" & Concat(
     counted,
     "<tr ><td>" & Substitute(
     NumeralDenomination,
     "USD ",
     ""
     ) & "</td><td>" & SerialNumber & "</td></tr>"
     ) & "</tbody></table></div>"
     )
     ),
     Value
     )
     )
     )
    )

     

     

  • SolTeferi Profile Picture
    on at

    The solution above works well. But, there is a little bug that repeats a row at the  bottom a table split and at the top of the next split. So, to fix that, please, use the following updated formula, which perfectly aligns the splits side by side:

    With(
     {
     wraps: RoundUp(
     CountRows(billCollection) / 2,
     0
     )
     },
     With(
     {
     colCount: RoundUp(
     CountRows(billCollection) / wraps,
     0
     )
     },
     With(
     {
     colSerial: Sequence(
     colCount,
     1,
     1
     )
     },
     "<html>
    <body>
    <p style = 'font-family:courier new'>USD Serial List
    <br>Generated By: " & ProfileName & "<br>Date / Time: " & Now() & Concat(
     ForAll(
     colSerial,
     With(
     {seq: ThisRecord.Value},
     With(
     {
     counted: LastN(
     FirstN(
     billCollection,
     seq * wraps
     ),
     If(
     seq = CountRows(colSerial),
     CountRows(billCollection) - (seq - 1)*wraps,
     wraps
     )
     )
     },
     "<div style='position:relative; float:left'>
    <table style = 'font-family:courier new; page-break-inside:auto'>
    <thead><tr 
     
    ><th>Denomination</th><th>Serial</th></thead>
    <tbody style = 'text-align:center;'>" & Concat(
     counted,
     "<tr ><td>" & Substitute(
     NumeralDenomination,
     "USD ",
     ""
     ) & "</td><td>" & SerialNumber & "</td></tr>"
     ) & "</tbody></table></div>"
     )
     )
     ),
     Value
     )
     )
     )
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard