cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misc
Resolver III
Resolver III

Convert Powerapps/Sharepoint List Rich Text to Plain Text and add to Excel

I am trying to write a flow which allows a user to 'Download' an export of an incident report via a Powerapp.

 

I don't have premium so I'm having to make my template for the export in Excel rather than Word. I've managed to get this to work, but I have realised that a few of the columns it is transferring are in Rich Text and so when it's exported it comes up with all the code too.

 

Excuse the formatting - I'll make it pretty if I can get it to work!

reportrichtext.png

 

Is there a way for me to convert the data pulled from the SharePoint List into PlainText in the flow?

 

I don't really understand variables and I tried to make a 'String' one but it made no difference so either that's the wrong thing to do or I didn't do it correctly!

 

Thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
misc
Resolver III
Resolver III

My colleague and I finally worked this out.

 

The flow looks like this:

fix.png

And then the output from the second 'Compose' (in this screenshot called IncidentDeets) is used in the 'add to table' in excel.

 

Substring expression for 'Compose' action:

substring(variables('IncidentDetails'),62)

Substring expression for 'IncidentDeets' action:

substring(outputs('Compose'),0,sub(length(outputs('Compose')),23))

 

This works because we know how many characters are before and after each string we want (eg. the <div/> bit) and it removes that from the output. 

 

The only small problem is that if you have used paragraphs it still comes out with the <p> etc. code within the text, but it's much more readable like this than it was otherwise. 

 

I hope this solution helps others in this situation!

View solution in original post

2 REPLIES 2
misc
Resolver III
Resolver III

Commenting to bump this thread as I'm still having this issue and it's put a stopper in this project. 

misc
Resolver III
Resolver III

My colleague and I finally worked this out.

 

The flow looks like this:

fix.png

And then the output from the second 'Compose' (in this screenshot called IncidentDeets) is used in the 'add to table' in excel.

 

Substring expression for 'Compose' action:

substring(variables('IncidentDetails'),62)

Substring expression for 'IncidentDeets' action:

substring(outputs('Compose'),0,sub(length(outputs('Compose')),23))

 

This works because we know how many characters are before and after each string we want (eg. the <div/> bit) and it removes that from the output. 

 

The only small problem is that if you have used paragraphs it still comes out with the <p> etc. code within the text, but it's much more readable like this than it was otherwise. 

 

I hope this solution helps others in this situation!

Helpful resources

Announcements
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.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,844)