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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,881)