Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Two Columns HTML Text PowerApps

Like (0) ShareShare
ReportReport
Posted on 10 Apr 2023 01:22:36 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>"

 

  • SolTeferi Profile Picture
    on 21 Apr 2023 at 05:18:01
    Re: Two Columns HTML Text PowerApps

    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
     )
     )
     )
    )
  • Verified answer
    SolTeferi Profile Picture
    on 11 Apr 2023 at 06:58:25
    Re: Two Columns HTML Text PowerApps

    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
     )
     )
     )
    )

     

     

  • v-jefferni Profile Picture
    on 11 Apr 2023 at 05:35:34
    Re: Two Columns HTML Text PowerApps

    Hi @kess ,

     

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

     

    Best regards,

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 225 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 110

#3
stampcoin Profile Picture

stampcoin 101

Overall leaderboard
Loading started