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 II
Super User II

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 II
Super User II

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

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (12,207)