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 / split string to new li...
Power Apps
Answered

split string to new line - HTML

(0) ShareShare
ReportReport
Posted on by 26

Hi all,

 

I have the below HTML code.

 

"<table border='1' width='100%'>" &
"<thead><tr><th>Location</th><th>Items</th></thead>" &
"<tbody>" &
Concat(gal_InstallationItems.AllItems, "<tr><td>" & Location & "</td><td>" & Item & "</td></tr>") &
"</tbody></table>"

 

 

within my gallery, the "Item" field is made up of a long string of items separated by a semi colon. Is there a way I can show the values after a semi colon to a new line?

 

so something like this.

 

Item1; Item2; Item3

 

to

 

Item1

Item2

Item3

 

Thank you for any help.

 

Categories:
I have the same question (0)
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    You can split the 'Item' property in its ';' characters, and concatenate them using "<br/>" (HTML new line), like in the example below:

    "<table border='1' width='100%'>" &
    "<thead><tr><th>Location</th><th>Items</th></thead>" &
    "<tbody>" &
    Concat(
     gal_InstallationItems.AllItems,
     "<tr><td>" &
     Location &
     "</td><td>" &
     Concat(Split(Item, ";"), Result, "<br/>") &
     "</td></tr>") &
    "</tbody></table>"

    Hope this helps!

  • Verified answer
    timl Profile Picture
    37,212 Super User 2026 Season 1 on at

     

    In addition to @CarlosFigueira's answer, you could also try substituting the semi colon with a <br/> like so:

    "<table border='1' width='100%'>" &
    "<thead><tr><th>Location</th><th>Items</th></thead>" &
    "<tbody>" &
    Concat(gal_InstallationItems.AllItems, "<tr><td>" & Location & "</td><td>" & 
    Substitute(Item,";", "<br/>") & "</td></tr>") &
    "</tbody></table>"

     

  • SukhRehal Profile Picture
    26 on at

    Thanks Guys,

    as a follow on question I am trying to group by the first column, is this possible?

     

    "<table border='1' width='100%'>" &
    "<thead><tr><th>Location</th><th>Items</th></thead>" &
    "<tbody>" &
    Concat(
     gal_InstallationItems.AllItems,
     "<tr><td>" &
     GroupBy(Location) &
     "</td><td>" &
     Concat(Split(Item, ";"), Result, "<br/>") &
     "</td></tr>") &
    "</tbody></table>"

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard