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 Automate / Convert Sharepoint Del...
Power Automate
Answered

Convert Sharepoint Delimited String in to HTML Table

(0) ShareShare
ReportReport
Posted on by 4
I have a sharepoint list that has some pipe delimited data stored in a Text column.  I am trying to extract the data and generate a table with one row for each delimited item.   I am really struggling to get anywhere with this.  I have tried several approaches and keep getting errors.  I can't really include my current flow because I don't have anything that has come close to working.
 
So for this example, I am looking for a table like the one below.
 
 
I'd like to generate an email with an html table with 6 rows.  The table could also be in the form of an attached csv file.
 
Compound Requestor
cp1 Whalen, Kevin M
cp2 Whalen, Kevin M
cp3 Whalen, Kevin M
cp4 Whalen, Kevin M
cp5 Whalen, Kevin M
cp6 Whalen, Kevin M
 
 
Any help/suggestions are appreciated.
 
Categories:
I have the same question (0)
  • Verified answer
    DEdFishe Profile Picture
    9 on at
    The following approach should work.
    1. Initialize an empty array of objects variable
    2. Create an apply to each to iterate through each SharePoint record and do the following in this scope:
      1. In a compose action, call the split function to split the current item's Compound field on the '|' character
      2. Use another compose action to capture the current SharePoint record's requestor for ease of use (ex item()?['Requestor'])
      3. Create a nested apply to each to iterate through the output of the previous compose and do the following in this scope:
        1. Compose a JSON object formatted as { "Compound": item, "Requestor": requestor_compose_output }
        2. Append the output of this compose to your array of objects variable
    3. Create an HTML table based off your array of objects variable
    Hope this helps!
     
  • KW-07042023-0 Profile Picture
    4 on at
    Thank you so much.....it took me a bit to figure out some details but I got it to work with your instructions!  
     
  • Chriddle Profile Picture
    8,689 Super User 2026 Season 1 on at
    With just a select and a little XPath, you can convert your input into a normal list that you can then filter:
    From:
    split(
    	join(
    		xpath(
    			xml(json(concat('{"Root": {"Item": ', outputs('Compose'), '}}'))),
    			concat('//Item/Compound/text()')
    		),
    		'|'
    	),
    	'|'
    )
    Compound:
    item()
    Requestor:
    first(
    	xpath(
    		xml(json(concat('{"Root": {"Item": ', outputs('Compose'), '}}'))),
    		concat(
    			'//Item[',
    				'./Compound="', item(), '" ',
    				'or contains(./Compound, "|', item(), '|") ',
    				'or starts-with(./Compound, "', item(), '|") ',
    				'or substring(./Compound, string-length(./Compound) - string-length("|', item(), '") + 1)  = "|', item(), '"',
    			']/Requestor/text()'
    		)
    	)
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard