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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,897)