cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cadone
Helper V
Helper V

Parse rich text

Since SharePoint list doesn't have a separate column for comments, I created my own column "comment".

How to parse the last entered text from the output. Someone please guide me. Scroll to end to see ( I have highlighted).

This is bit tricky for me.

 

"<div class=\"ExternalClass0BA8BA1AB9BE46A2881150A7F5625A8C\"><div style=\"font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);\"><span style=\"color&#58;black;\">​</span><span style=\"color&#58;black;\">​new comment column</span>. How to add new comment section.</div><div style=\"font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);\"><p>New Line added. <br></p><p>Can you read this?</p><p><br></p></div></div>"
1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @cadone ,

start with the 'HTML to Text' action, that will give you only the text from the HTML.

Then split it using end of line. This is kind of funny, you must enter actual 'Enter' in the expression, it seems there's no code for end of line. 🙂

split(outputs('Html_to_text')?['body'],'
')

and then take the last(...) item from the output array:

last(outputs('Compose_14'))

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

1 REPLY 1
tom_riha
Super User
Super User

Hello @cadone ,

start with the 'HTML to Text' action, that will give you only the text from the HTML.

Then split it using end of line. This is kind of funny, you must enter actual 'Enter' in the expression, it seems there's no code for end of line. 🙂

split(outputs('Html_to_text')?['body'],'
')

and then take the last(...) item from the output array:

last(outputs('Compose_14'))

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,856)